declare @t table (a varchar(20))
insert into @t (a) 
select '1,2,3,4,5,6,7,8,9'
union all
select '10,20,30,40'
union all
select '100,200,300,400'
declare @a int
set @a=1select * from @tselect * from @t where charindex(','+cast(@a as varchar(2))+',',','+a+',')>0  -----##