SUBSTRING(STR,BIN,LEN);(字符串,开始位,长度)
length(str) 长度 utf-8 中文3字节
mybatis 模糊查询 concat("%",字符串,“%”)
e.g..
select a.*,b.storeName,concat("%",a.storeName,"%") from tbreport a, tbstore b where b.storeName like concat("%",a.storeName,"%")
本文介绍了使用MyBatis进行模糊查询的方法,并提供了一个具体的示例。通过concat('%',字符串,'%')的方式,可以实现对数据库中某字段的模糊匹配。
SUBSTRING(STR,BIN,LEN);(字符串,开始位,长度)
length(str) 长度 utf-8 中文3字节
mybatis 模糊查询 concat("%",字符串,“%”)
e.g..
select a.*,b.storeName,concat("%",a.storeName,"%") from tbreport a, tbstore b where b.storeName like concat("%",a.storeName,"%")
870

被折叠的 条评论
为什么被折叠?