declare @a table
(
id int,
wsslbh varchar(20)
)
insert into @a
select 1,'W001' union all
select 2,'W002' union all
select 3,'W003' union all
select 4,'W004' union all
select 5,'W005' union all
select 6,'W006'
declare @b varchar(100)
set @b='W001,W002,W003'
--拼接字符串,反向查询
select * from @a tabA where @b like '%'+tabA.wsslbh+'%'