declare @id varchar(100)
set @id='1,2,3'delete tb
where stuase=0 and charindex(','+rtrim(id)+',', ','+@id+',')>0update tb set stuase=0
where stuase=1 and charindex(','+rtrim(id)+',', ','+@id+',')>0