Tag

Dynamic SQL

0 views collected around this technical thread.

Java Captain
Java Captain
May 9, 2025 · Backend Development

Configuring MyBatis Dynamic SQL with XML and Annotation: Setup, Code Samples, and Pros & Cons

This article explains how to configure MyBatis for dynamic SQL using XML mapper files and annotation-based methods, provides step‑by‑step code examples, and compares the advantages and disadvantages of each approach to help developers choose the best solution for their projects.

AnnotationsDynamic SQLJava
0 likes · 5 min read
Configuring MyBatis Dynamic SQL with XML and Annotation: Setup, Code Samples, and Pros & Cons
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.

Dynamic SQLJavaMyBatis
0 likes · 19 min read
Advanced MyBatis Dynamic SQL Techniques: foreach, if, choose, trim, selectKey, and SQL Fragments
JD Tech Talk
JD Tech Talk
Jan 8, 2025 · Backend Development

Dynamic Database Switching in MyBatis Using SQL Source Decoration

This article explains how to implement dynamic database switching in MyBatis by intercepting and modifying SQL statements to prepend database names to table names, using JSqlParser and MyBatis interceptors.

Database SwitchingDecorator PatternDynamic SQL
0 likes · 6 min read
Dynamic Database Switching in MyBatis Using SQL Source Decoration
Code Ape Tech Column
Code Ape Tech Column
Aug 22, 2024 · Backend Development

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

This article provides a comprehensive guide to using MyBatis dynamic SQL tags—including foreach, if, choose, trim, selectKey, and sql fragments—explaining their attributes, usage scenarios, and offering detailed Java and XML code examples to improve query flexibility and reduce errors.

Dynamic SQLJavaMyBatis
0 likes · 19 min read
Advanced MyBatis Dynamic SQL: foreach, if, choose, trim, selectKey, and SQL Fragments
Selected Java Interview Questions
Selected Java Interview Questions
Aug 20, 2024 · Backend Development

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

This article provides a comprehensive guide to using MyBatis dynamic SQL tags such as foreach, if, choose, trim, selectKey, and sql fragments, illustrating best practices with detailed code examples for building flexible, error‑free queries and updates in Java backend applications.

Dynamic SQLJavaMyBatis
0 likes · 19 min read
Advanced MyBatis Dynamic SQL Techniques: foreach, if, choose, trim, selectKey, and SQL Fragments
IT Services Circle
IT Services Circle
Jul 14, 2024 · Backend Development

Understanding MyBatis Dynamic SQL, OOM Incidents, and the Importance of Backend Parameter Validation

This article explains MyBatis dynamic SQL, recounts a first‑hand OOM incident caused by missing backend validation, and shares practical lessons on parameter checking, balancing reusable versus specialized interfaces, and adopting defensive programming to build more reliable backend systems.

Backend ValidationDynamic SQLMyBatis
0 likes · 11 min read
Understanding MyBatis Dynamic SQL, OOM Incidents, and the Importance of Backend Parameter Validation
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
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.

Dynamic SQLMySQLPerformance
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 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.

Dynamic SQLJavaMyBatis
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.

Dynamic SQLJavaMyBatis
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
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 SQLMySQL
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.

Dynamic SQLJavaMyBatis
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
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 SQLMySQL
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.

Dynamic SQLJavaMyBatis
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.

Best PracticesDynamic SQLQuery Optimization
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