create table a (id int identity(1,1),s nvarchar(100)) insert into a select '体育,国内' union all select '体育,国际' union all select '国际财经,国内,国际' union all select '明星' godeclare @s nvarchar(100) select @s=s from a where id=3exec('select * from a where patindex(''%['+@s+']%'',s)>0')drop table a go
insert into a select '体育,国内' union all select '体育,国际'
union all select '国际财经,国内,国际' union all select '明星'
godeclare @s nvarchar(100)
select @s=s from a where id=3exec('select * from a where patindex(''%['+@s+']%'',s)>0')drop table a
go
回复人: xluzhong(打麻将一缺三,咋办?) ( ) 信誉:100