日期:2014-05-17 浏览次数:20590 次
declare @id_sz varchar(200)
set @id_sz='70,73,76,05'
exec('select * from aTable where id_sz in ('+@id_sz+')')
------解决方案--------------------
--或者这样。
declare @id_sz varchar(200)
set @id_sz='70,73,76,05'
select * from aTable where charindex(','+id_sz+',',','+@id_sz+',')>0
------解决方案--------------------
2楼也可,就是效率没有 1楼好.