当前位置: 代码迷 >> Sql Server >> sql海涵查询咋写!求大神
  详细解决方案

sql海涵查询咋写!求大神

热度:38   发布时间:2016-04-24 23:19:56.0
sql包涵查询咋写!求大神!
select* from xx where a like '%'+@ABC+'%'
@ABC 里面包涵 1,2,3,。。。。
这查询咋写啊

a字段里面也有1,2,3,。。。
sql

------解决方案--------------------
用charindex
Address包含rd的记录
select* from xx where  charindex('rd',Address) >0
------解决方案--------------------
引用:
还是查询不了啊 
select* from xxx where  charindex('谢',a)

 where  charindex('谢',a)>0
  相关解决方案