1.MySQL数据库
SELECT * FROM user WHERE name like CONCAT('%',#{name},'%')
2.SqlServer数据库
SELECT * FROM user WHERE name like CONCAT('%',#{name},'%')
3.Oracle数据库
SELECT * FROM user WHERE name like CONCAT('%',#{name},'%') 或者 SELECT * FROM user WHERE name like '%'||#{name}||'%'
4.DB2
SELECT * FROM user WHERE name like CONCAT('%',#{name},'%') 或者 SELECT * FROM user WHERE name like '%'||#{name}||'%'