SQL is a very powerful feature of MyBatis. It enables to write the query using the
SQL. MyBatis uses a powerful
SQL language that can be used within any mapped SQL statement. Following are the OGNL based
SQL expressions provided by choose when, otherwise trim where, set foreach The if Statement The most common thing to do in
SQL is conditionally include a part of a where clause. For example −