Tagged articles
55 articles
Page 1 of 1
Code Ape Tech Column
Code Ape Tech Column
Nov 4, 2025 · Backend Development

Master MyBatis Dynamic SQL: 9 Essential Tags and Best Practices

This article walks through nine powerful MyBatis dynamic SQL tags—including foreach, if, choose, selectKey, trim, and sql fragments—explaining their attributes, common pitfalls, and providing complete XML and Java examples to help developers write cleaner, error‑free queries and updates.

BackendDynamic SQLJava
0 likes · 17 min read
Master MyBatis Dynamic SQL: 9 Essential Tags and Best Practices
Java Architect Essentials
Java Architect Essentials
Apr 7, 2025 · Backend Development

Advanced MyBatis Dynamic SQL Techniques: foreach, if, choose, trim, selectKey, and SQL Fragments

This article provides a comprehensive guide to MyBatis dynamic SQL tags—including foreach, if, choose, trim, selectKey, and reusable SQL fragments—explaining their attributes, usage patterns, and code examples to help developers write cleaner, more reliable XML mappers and avoid common pitfalls.

Backend DevelopmentDynamic SQLJava
0 likes · 19 min read
Advanced MyBatis Dynamic SQL Techniques: foreach, if, choose, trim, selectKey, and SQL Fragments
macrozheng
macrozheng
Jun 21, 2024 · Backend Development

Master MyBatis Dynamic SQL: 9 Essential Tag Techniques for Cleaner Code

This article walks through MyBatis dynamic SQL tags—foreach, concat, choose, selectKey, if, where, trim, set, and sql fragments—explaining their attributes, usage patterns, and common pitfalls, and provides complete XML and Java code examples for each technique.

Dynamic SQLJavaMyBatis
0 likes · 20 min read
Master MyBatis Dynamic SQL: 9 Essential Tag Techniques for Cleaner Code
Su San Talks Tech
Su San Talks Tech
Jun 12, 2024 · Backend Development

Master MyBatis Dynamic SQL: 9 Essential Tags and Best Practices

This article explains how to use MyBatis dynamic SQL tags—including foreach, concat, choose, selectKey, if, where, set, trim, and sql fragments—providing clear examples and tips to write concise, error‑free XML mappings for Java backend applications.

Dynamic SQLJavaMyBatis
0 likes · 17 min read
Master MyBatis Dynamic SQL: 9 Essential Tags and Best Practices
Architecture Digest
Architecture Digest
Jun 11, 2024 · Databases

Multi‑Branch Product Sales Statistics Query Using Row Comparison in MySQL

This article explains how to design a MySQL table for product sales statistics, initialize massive test data, and compare several query strategies—including loop queries, OR‑concatenated dynamic SQL, mixed filtering, and the SQL‑92 row‑comparison technique—to efficiently retrieve sales figures for multiple business units and their products without violating development constraints.

BackendDynamic SQLRow Comparison
0 likes · 7 min read
Multi‑Branch Product Sales Statistics Query Using Row Comparison in MySQL
Java Tech Enthusiast
Java Tech Enthusiast
Jun 6, 2024 · Backend Development

MyBatis Dynamic SQL and Tag Usage Guide

MyBatis dynamic SQL lets developers construct conditional queries at runtime using tags like if, where, trim, choose, set, foreach, sql, include, and bind, simplifying complex statements, avoiding manual string concatenation, supporting batch operations, reusable fragments, and one‑to‑many mappings while improving flexibility and maintainability.

Dynamic SQLJavaMyBatis
0 likes · 16 min read
MyBatis Dynamic SQL and Tag Usage Guide
Top Architect
Top Architect
Jun 5, 2024 · Backend Development

Advanced MyBatis Dynamic SQL Techniques and Best Practices

This article provides a comprehensive guide to MyBatis dynamic SQL, covering foreach loops, conditional if, choose, selectKey, trim, and sql fragments, with detailed explanations and full XML and Java code examples to help developers write efficient, error‑free mappings.

Dynamic SQLJavaMyBatis
0 likes · 20 min read
Advanced MyBatis Dynamic SQL Techniques and Best Practices
Java Backend Technology
Java Backend Technology
Jun 3, 2024 · Databases

How to Efficiently Query Multi‑Business Sales Data with Row‑Comparison in MySQL

This article explores how to retrieve sales statistics for multiple business units and their associated products in MySQL, compares loop‑based, OR‑concatenated, mixed‑filter, and SQL‑92 row‑comparison techniques, and explains why the row‑comparison method was ultimately chosen for its performance and compliance with development constraints.

Dynamic SQLRow ComparisonSQL
0 likes · 8 min read
How to Efficiently Query Multi‑Business Sales Data with Row‑Comparison in MySQL
Java Architect Essentials
Java Architect Essentials
Mar 14, 2024 · Backend Development

Understanding MyBatis Dynamic SQL and Tag Usage

This article explains MyBatis dynamic SQL, its purpose, and how to use various tags such as if, where, trim, choose, foreach, include, sql, resultMap, association, and collection, providing detailed code examples and best‑practice guidelines for building flexible and secure SQL statements in Java applications.

Backend DevelopmentDynamic SQLJava
0 likes · 15 min read
Understanding MyBatis Dynamic SQL and Tag Usage
Java Captain
Java Captain
Mar 14, 2024 · Backend Development

Comprehensive Guide to MyBatis Dynamic SQL and XML Mapping Tags

This article explains MyBatis dynamic SQL concepts, details the nine dynamic tags (if, where, set, choose, trim, foreach, sql, include, association), provides complete XML mapper examples with code snippets, and demonstrates one‑to‑many, many‑to‑one, and many‑to‑many association queries for Java backend development.

Backend DevelopmentDynamic SQLJava
0 likes · 16 min read
Comprehensive Guide to MyBatis Dynamic SQL and XML Mapping Tags
Java Architect Essentials
Java Architect Essentials
Sep 24, 2023 · Backend Development

Understanding MyBatis Dynamic SQL and XML Mapping Tags

This article provides a comprehensive guide to MyBatis dynamic SQL, explaining its features, common XML tags such as if, where, set, choose, trim, foreach, include, and sql, and demonstrates how to implement CRUD operations, conditional queries, batch processing, and association mappings with clear code examples.

Dynamic SQLJavaMyBatis
0 likes · 17 min read
Understanding MyBatis Dynamic SQL and XML Mapping Tags
Java Interview Crash Guide
Java Interview Crash Guide
Sep 14, 2023 · Backend Development

Master MyBatis Dynamic SQL: Tags, Conditions, and Advanced Queries

This article explains MyBatis dynamic SQL, its nine XML tags, execution principle, and how to use if, where, set, choose, trim, foreach, sql, include, and association mappings for flexible query building, batch operations, and one‑to‑many, many‑to‑one, and many‑to‑many relationships.

Dynamic SQLJavaMyBatis
0 likes · 17 min read
Master MyBatis Dynamic SQL: Tags, Conditions, and Advanced Queries
Top Architect
Top Architect
Aug 2, 2023 · Databases

Implementing Multi‑Business Product Sales Statistics Queries Using Row‑Comparison in MySQL

This article explains how to query sales statistics for multiple business units and their associated products in MySQL by preparing the environment, presenting several candidate solutions—including loop queries, OR concatenation, mixed filtering, and finally row‑comparison—and selecting the row‑comparison approach as the optimal implementation.

Database OptimizationDynamic SQLRow Comparison
0 likes · 8 min read
Implementing Multi‑Business Product Sales Statistics Queries Using Row‑Comparison in MySQL
Selected Java Interview Questions
Selected Java Interview Questions
Jul 30, 2023 · Backend Development

Understanding MyBatis Dynamic SQL and XML Mapping Tags

This article explains MyBatis dynamic SQL, its execution principle, and the nine core XML tags (if, where, set, choose, trim, foreach, sql, include, resultMap) with detailed examples of CRUD operations, conditional queries, batch processing, and association mappings for Java backend development.

Backend DevelopmentDynamic SQLJava
0 likes · 15 min read
Understanding MyBatis Dynamic SQL and XML Mapping Tags
macrozheng
macrozheng
Jul 25, 2023 · Backend Development

Dynamic SQL with MyBatis Interceptors in Spring Boot

This tutorial explains how to use MyBatis interceptor mechanisms to dynamically modify SQL statements at runtime in a Spring Boot application, covering interceptor types, implementation steps, configuration, core code, testing, and common use cases such as SQL monitoring, pagination, and data permission filtering.

Dynamic SQLInterceptorJava
0 likes · 11 min read
Dynamic SQL with MyBatis Interceptors in Spring Boot
Su San Talks Tech
Su San Talks Tech
Jul 14, 2023 · Backend Development

How to Use MyBatis Interceptor for Dynamic SQL in Spring Boot 3

This article demonstrates how to leverage MyBatis interceptor mechanism in a Spring Boot 3 application to dynamically modify SQL statements, showing step‑by‑step implementation, configuration, core code, testing, and common use cases such as SQL monitoring, pagination, and data permission filtering.

Dynamic SQLInterceptorJava
0 likes · 11 min read
How to Use MyBatis Interceptor for Dynamic SQL in Spring Boot 3
Code Ape Tech Column
Code Ape Tech Column
Jul 13, 2023 · Databases

Using Row‑Row Comparison to Query Sales Statistics for Multiple Business Units and Products in MySQL

This article explains how to design a MySQL table for product sales statistics, prepares sample data, describes the business requirement of querying sales for multiple business units and their associated products, and evaluates several query strategies—looping, OR concatenation, mixed filtering, and finally row‑row comparison—highlighting why the latter is chosen as the optimal solution.

Database OptimizationDynamic SQLQuery Design
0 likes · 9 min read
Using Row‑Row Comparison to Query Sales Statistics for Multiple Business Units and Products in MySQL
Java Architect Essentials
Java Architect Essentials
Jun 11, 2023 · Backend Development

Using MyBatis Dynamic SQL: if, choose, trim, foreach, and bind Tags

This article provides a comprehensive guide to MyBatis dynamic SQL, demonstrating how to use if, choose, trim, foreach, and bind tags for conditional queries, updates, inserts, batch operations, and database‑agnostic expressions, complete with Maven project setup, SQL scripts, and test cases.

BackendDynamic SQLJava
0 likes · 15 min read
Using MyBatis Dynamic SQL: if, choose, trim, foreach, and bind Tags
Sohu Tech Products
Sohu Tech Products
Mar 29, 2023 · Databases

Understanding the Purpose and Impact of WHERE 1=1 in SQL Queries

This article explains why developers often include the redundant condition “WHERE 1=1” in SQL statements, demonstrating through performance tests that it has no effect on execution time, and describing its practical use for simplifying the addition of further conditions in both static and dynamic queries.

Dynamic SQLSQLWHERE clause
0 likes · 6 min read
Understanding the Purpose and Impact of WHERE 1=1 in SQL Queries
Top Architect
Top Architect
Jan 9, 2023 · Backend Development

Using MyBatis Dynamic SQL Tags: foreach, if, choose, trim, selectKey and More

This article provides a comprehensive guide to MyBatis dynamic SQL tags—including foreach, if, choose, trim, selectKey, and related constructs—explaining their attributes, usage scenarios, and offering detailed Java and XML code examples for building flexible and error‑free database queries.

Dynamic SQLJavaMyBatis
0 likes · 16 min read
Using MyBatis Dynamic SQL Tags: foreach, if, choose, trim, selectKey and More
Top Architect
Top Architect
Aug 4, 2022 · Databases

Implementing Multi‑Business‑Unit Sales Statistics Queries with Row‑by‑Row Comparison in MySQL

The article explains how to query sales statistics for multiple business units and their associated products in MySQL, compares several implementation strategies such as looping, OR‑concatenation, mixed filtering, and finally adopts the SQL‑92 row‑by‑row comparison technique to achieve a single‑query solution that respects indexing and corporate coding standards.

Dynamic SQLPerformance OptimizationRow Comparison
0 likes · 8 min read
Implementing Multi‑Business‑Unit Sales Statistics Queries with Row‑by‑Row Comparison in MySQL
Sanyou's Java Diary
Sanyou's Java Diary
Jun 23, 2022 · Backend Development

Master MyBatis: From Basics to Advanced Features and Best Practices

This comprehensive guide explains what MyBatis is, compares it with Hibernate, details its core components, configuration, dynamic SQL, caching, plugins, pagination, and practical usage patterns, providing Java developers with clear examples, code snippets, and visual diagrams to master the framework efficiently.

Dynamic SQLMyBatisORM
0 likes · 38 min read
Master MyBatis: From Basics to Advanced Features and Best Practices
Top Architect
Top Architect
Apr 19, 2022 · Databases

Querying Multi‑Business‑Unit Product Sales with Row Comparison in MySQL

This article explains how to retrieve sales statistics for multiple business units and their associated products in MySQL by comparing rows, discusses alternative approaches such as loop queries, OR concatenation, and mixed filtering, and demonstrates why row‑by‑row comparison is the most suitable solution.

Backend DevelopmentDatabase OptimizationDynamic SQL
0 likes · 8 min read
Querying Multi‑Business‑Unit Product Sales with Row Comparison in MySQL
Liangxu Linux
Liangxu Linux
Apr 5, 2022 · Databases

Efficiently Query Multi‑Business‑Entity Sales Data with MySQL Row Comparison

This article explains how to retrieve sales statistics for multiple business units and their selected products in MySQL, compares loop‑based, OR‑concatenated, mixed‑filter, and SQL‑92 row‑comparison approaches, and shows why the row‑comparison technique was ultimately chosen for its index usage and simplicity.

Database designDynamic SQLRow Comparison
0 likes · 6 min read
Efficiently Query Multi‑Business‑Entity Sales Data with MySQL Row Comparison
Top Architect
Top Architect
Mar 14, 2022 · Databases

Implementing Multi‑Business‑Unit Sales Queries with SQL Row‑Comparison in MySQL

This article explains how to design a MySQL table for product sales statistics and compares several query strategies—including loop queries, OR concatenation, mixed filtering, and the SQL‑92 row‑comparison technique—to efficiently retrieve sales data for multiple business units and their associated products in a single indexed query.

Database OptimizationDynamic SQLMyBatis
0 likes · 7 min read
Implementing Multi‑Business‑Unit Sales Queries with SQL Row‑Comparison in MySQL
21CTO
21CTO
Mar 9, 2022 · Databases

Mastering Multi‑Business Sales Queries with Row‑Comparison in MySQL

This article explores how to query sales data for multiple business units and selected products in MySQL, comparing loop queries, OR concatenation, mixed filtering, and SQL‑92 row‑value comparison, ultimately recommending the row‑comparison technique for efficiency and maintainability.

Database designDynamic SQLRow Comparison
0 likes · 8 min read
Mastering Multi‑Business Sales Queries with Row‑Comparison in MySQL
Top Architect
Top Architect
Jan 13, 2022 · Backend Development

Understanding MyBatis Dynamic SQL: Parsing, Nodes, and Execution

This article explains MyBatis dynamic SQL, covering its purpose, the distinction between static and dynamic SQL, the core SqlNode and SqlSource classes, how MyBatis parses and assembles SQL scripts recursively, and provides concrete code examples to illustrate each step.

Backend DevelopmentCode ExampleDynamic SQL
0 likes · 13 min read
Understanding MyBatis Dynamic SQL: Parsing, Nodes, and Execution
Java Architect Essentials
Java Architect Essentials
Sep 23, 2021 · Backend Development

MyBatis Dynamic SQL: Using if, choose, foreach, trim, and bind Tags with Practical Code Samples

This article demonstrates how MyBatis dynamic SQL simplifies conditional query building by explaining the usage of if, choose, foreach, trim, and bind tags, providing Maven project setup, table creation scripts, mapper interfaces, XML snippets, and unit test examples for SELECT, UPDATE, INSERT, and batch operations.

BackendDynamic SQLJava
0 likes · 19 min read
MyBatis Dynamic SQL: Using if, choose, foreach, trim, and bind Tags with Practical Code Samples
Top Architect
Top Architect
Aug 20, 2021 · Databases

Querying Multi‑Business Unit Product Sales Statistics with MySQL and MyBatis Dynamic SQL

This article explains how to retrieve sales statistics for multiple business units and their associated products from a MySQL table, compares several implementation approaches—including loop queries, OR concatenation, mixed filtering, and row‑comparison using MyBatis dynamic SQL—evaluates index usage, and provides the final recommended solution.

Database QueryDynamic SQLMyBatis
0 likes · 8 min read
Querying Multi‑Business Unit Product Sales Statistics with MySQL and MyBatis Dynamic SQL
Java Captain
Java Captain
Aug 15, 2021 · Databases

Querying Multi‑Business Unit Sales Statistics Using Row Comparison in MySQL

The article describes how to design a MySQL table for product sales statistics, initialize large data sets, and compare several approaches—including loop queries, OR concatenation, mixed filtering, and row‑comparison techniques—ultimately selecting row‑comparison as the most efficient solution within MyBatis dynamic SQL constraints.

Database designDynamic SQLMyBatis
0 likes · 6 min read
Querying Multi‑Business Unit Sales Statistics Using Row Comparison in MySQL
Architecture Digest
Architecture Digest
May 19, 2021 · Backend Development

Why MyBatis Treats Integer 0 as an Empty String in <if> Conditions

When using MyBatis dynamic SQL to filter records by a numeric state field, the framework incorrectly evaluates the condition "state != ''" as false for the integer value 0 because its OGNL expression evaluator treats 0 as equivalent to an empty string, leading to unexpected query results.

Dynamic SQLInteger ComparisonJava
0 likes · 7 min read
Why MyBatis Treats Integer 0 as an Empty String in <if> Conditions
Liangxu Linux
Liangxu Linux
Apr 22, 2021 · Databases

Why Developers Use ‘WHERE 1=1’ in SQL and How to Apply It Effectively

The article explains that inserting ‘WHERE 1=1’ in dynamically built SQL statements prevents syntax errors when appending additional conditions, illustrates its use with Java string concatenation examples, discusses performance considerations, and shows how to copy tables or duplicate structures using this technique.

Database PerformanceDynamic SQLSQL
0 likes · 3 min read
Why Developers Use ‘WHERE 1=1’ in SQL and How to Apply It Effectively
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Apr 7, 2021 · Backend Development

Nine MyBatis SQL Tricks for SpringBoot Web Applications (MySQL Example)

This article presents nine practical MyBatis techniques—including pagination, preset column selection, one‑to‑many and one‑to‑one associations, foreach‑in queries, dynamic where clauses, choose/otherwise logic, hidden _parameter usage, and dynamic set updates—illustrated with SpringBoot and MySQL code examples.

Backend DevelopmentDynamic SQLMyBatis
0 likes · 6 min read
Nine MyBatis SQL Tricks for SpringBoot Web Applications (MySQL Example)
macrozheng
macrozheng
Dec 28, 2020 · Backend Development

Master MyBatis Dynamic SQL: Eliminate XML Mappers and Supercharge CRUD

This tutorial explains how to replace verbose MyBatis mapper XML files with the modern Dynamic SQL API, covering setup, Maven dependencies, configuration, code generation, CRUD operations, advanced queries, subqueries, joins, conditional updates, and one‑to‑many mappings for Java backend development.

CRUDCode GenerationDynamic SQL
0 likes · 34 min read
Master MyBatis Dynamic SQL: Eliminate XML Mappers and Supercharge CRUD
Architect's Tech Stack
Architect's Tech Stack
Dec 16, 2020 · Databases

MyBatis Dynamic SQL Tutorial: Using if, choose, trim, foreach, and bind Tags with Code Examples

This article explains MyBatis dynamic SQL features—including if, choose, trim, foreach, and bind tags—by showing how to set up a Maven project, create a student table, write mapper methods, and run tests that demonstrate conditional queries, updates, inserts, batch operations, and database‑agnostic expressions.

Dynamic SQLMyBatisORM
0 likes · 19 min read
MyBatis Dynamic SQL Tutorial: Using if, choose, trim, foreach, and bind Tags with Code Examples
IT Xianyu
IT Xianyu
Sep 19, 2020 · Backend Development

Using MyBatis Dynamic SQL Tags (if, choose, trim, foreach, bind) for Conditional Queries and Updates

This article explains how MyBatis dynamic SQL tags such as if, choose, trim, foreach, and bind can be used to build flexible SELECT, INSERT, UPDATE, and DELETE statements, showing code examples, test cases, and best‑practice tips for handling optional parameters and batch operations in Java backend development.

BackendDynamic SQLJava
0 likes · 20 min read
Using MyBatis Dynamic SQL Tags (if, choose, trim, foreach, bind) for Conditional Queries and Updates
Code Ape Tech Column
Code Ape Tech Column
Sep 4, 2020 · Backend Development

Master MyBatis Dynamic SQL: Essential Tags and Real-World Examples

This article explains MyBatis dynamic SQL, describing each core XML tag (if, choose/when/otherwise, where, foreach, set, sql, include), showing practical code snippets, and offering advanced tips such as avoiding magic numbers and referencing SQL fragments across mapper files.

Backend DevelopmentDynamic SQLJava
0 likes · 14 min read
Master MyBatis Dynamic SQL: Essential Tags and Real-World Examples
Top Architect
Top Architect
Aug 31, 2020 · Backend Development

MyBatis Dynamic SQL Tags: if, choose, trim, foreach, bind for Conditional Queries, Updates, Inserts, and Batch Operations

This tutorial explains how to use MyBatis dynamic SQL tags such as if, choose, trim, foreach, and bind to build flexible SELECT, UPDATE, INSERT, and batch statements, demonstrating data preparation, conditional query construction, selective updates, conditional inserts, and advanced tag usage with complete Java test examples.

Dynamic SQLJavaMyBatis
0 likes · 20 min read
MyBatis Dynamic SQL Tags: if, choose, trim, foreach, bind for Conditional Queries, Updates, Inserts, and Batch Operations
Programmer DD
Programmer DD
Jul 28, 2020 · Backend Development

Master MyBatis Dynamic SQL: IF, CHOOSE, FOREACH, and BIND Explained

This article provides a comprehensive guide to MyBatis dynamic SQL, covering essential tags such as if, choose, trim, foreach, and bind, with practical Maven project setup, full SQL examples, and JUnit tests that demonstrate conditional queries, updates, inserts, and batch operations.

BackendDynamic SQLMyBatis
0 likes · 20 min read
Master MyBatis Dynamic SQL: IF, CHOOSE, FOREACH, and BIND Explained