日期:2014-05-17 浏览次数:20537 次
declare @t table(x varchar(100)) insert into @t values ('1,2,3,4,5,6,7,8') insert into @t values ('2,3,4,5,6,7,8,11') insert into @t values ('2,3,4,5,6,7,8') select * from @t where ','+x+',' like '%,1,%'; select * from @t where patindex('%,1,%',','+x+',')>0;