标签:ike str mysq color rac sel weight use sele
> Oracle
SELECT * FROM user WHERE name LIKE CONCAT(‘%‘,#{name},‘%‘) 或 SELECT * FROM user WHERE name LIKE ‘%‘||#{name}||‘%‘
> SQL Server
SELECT * FROM user WHERE name LIKE ‘%‘+#{name}+‘%‘
> MySQL
SELECT * FROM user WHERE name LIKE CONCAT(‘%‘,#{name},‘%‘)
> DB2
SELECT * FROM user WHERE name LIKE CONCAT(‘%‘,#{name},‘%‘) 或 SELECT * FROM user WHERE name LIKE ‘%‘||#{name}||‘%‘
> 通用
SELECT * FROM user WHERE 1 = 1 <if test="name != null and name != ‘‘"> <bind name="pattern" value="‘%‘ + _parameter.name + ‘%‘" /> AND name LIKE #{pattern} </if>
标签:ike str mysq color rac sel weight use sele
原文地址:https://www.cnblogs.com/mike-mei/p/13266119.html