Sql Articles
2 articles about Sql. Explore Spring Boot implementation, design, and operations across related topics.
-
Dynamic SQL in Spring Boot + MyBatis: How to Write where, set, trim, choose, bind, and foreach, and How to Fix "Leading AND Left Behind", "Trailing Comma", and "Empty IN Clause Crashes"
A walkthrough of Spring Boot + MyBatis dynamic SQL tags (where/set/trim/choose/bind/foreach), showing the XML you write side by side with the SQL actually issued. Covers a search Mapper that doesn't break even when every condition is empty, partial updates that never leave a trailing comma, and defensive patterns so foreach doesn't fail when given an empty list or null, organized as fixes by error type.
-
How to Execute Raw SQL with Spring Boot's JdbcTemplate - Using queryForObject, RowMapper, and Batch Updates
A hands-on, code-focused guide to safely writing raw SQL with Spring's standard JdbcTemplate, covering single-row and scalar retrieval with queryForObject, multi-row retrieval with RowMapper/BeanPropertyRowMapper, CRUD with update/batchUpdate, named parameter binding with NamedParameterJdbcTemplate, and integration with @Transactional.