标签:
select * from tb where charindex(‘abcdefgh‘,name)>0
select * from tb where patindex(‘%abcdefgh%‘,name)>0
select * from tblTest where ‘abcdefgh‘ like ‘%‘+name+‘%‘
Select * from tblTest where name like ‘%abcdefgh%‘
select * from tblTest where replace(‘abcdefgh‘,name,‘‘) < 8
declare @str varchar(100)
set @str=‘abcdefgh‘
select * from tblTest where @str like ‘%‘+name+‘%‘
--> or
select * from tblTest where replace(@str,name,‘‘)<>@str
select name from tab where replace(name,‘abcd‘,‘‘)<>name 通杀...
记录一下,经常用到。
标签:
原文地址:http://www.cnblogs.com/zhyp/p/5598224.html