日期:2014-05-18 浏览次数:20471 次
select * from tb where charindex(',22,' , ',' + b + ',') > 0 and charindex(',4,' , ',' + b + ',') > 0
------解决方案--------------------
select * from 表 where charindex(',22,',','+b+',')>0 and charindex(',4,',','+b+',')>0
------解决方案--------------------
--这两种都行. select * from tb where charindex(',22,' , ',' + b + ',') > 0 and charindex(',4,' , ',' + b + ',') > 0 select * from tb where ',' + b + ',' like '%,22,%' and ',' + b + ',' like '%,4,%'