一般在sqlserver数据库查询中如果查询条件存在中括号那么会查询失败,如:
select * from pubNews t where t.newsTitle like '%[啦啦啦]%'
将返回空数据记录。需要通过escape 进行转义才能查到数据:
select * from pubNews t where t.newsTitle like '%/[啦啦啦/]%' escape '/'
一般在sqlserver数据库查询中如果查询条件存在中括号那么会查询失败,如:
select * from pubNews t where t.newsTitle like '%[啦啦啦]%'
将返回空数据记录。需要通过escape 进行转义才能查到数据:
select * from pubNews t where t.newsTitle like '%/[啦啦啦/]%' escape '/'