22,298
社区成员
发帖
与我相关
我的任务
分享declare @strid varchar(20)
set @strid='57,4,61'
exec ('select * from temp where convert(varchar,id) in ('+ @strid +')')select * from temp where charindex(','+ltrim(id)+',',','+@strid+',')>0selct * from temp where charindex(','+ltrim(id)+',',','+@strid+',')>0