Mybatis 模糊搜索参数有英文单引号?
mapper中是这样写的 name like concat('%',#{searchValue},'%')
当参数searchValue 有单引号的时候
例如: '搜索内容 或 '搜索内容'
报错?请问怎么解决
Mybatis 模糊搜索参数有英文单引号?
mapper中是这样写的 name like concat('%',#{searchValue},'%')
当参数searchValue 有单引号的时候
例如: '搜索内容 或 '搜索内容'
报错?请问怎么解决
模糊查询不都是 select a,b from table where a like '%王%' 这种格式的吗 如果你中间拼参数的话 '%'||王||'%' 用双竖线拼接试试