mybatis vague wording of the query mapper.xml

1. sql string splicing

   SELECT * FROM tableName WHERE name LIKE CONCAT(CONCAT('%', #{text}), '%');

 

2. Instead of using $ {...} # {...}

   SELECT * FROM tableName WHERE name LIKE '%${text}%';

Guess you like

Origin www.cnblogs.com/qingmuchuanqi48/p/11853983.html