select *from news where news_key=like '%,国内'
...............................................

解决方案 »

  1.   

    也就是专题吧。如果我取出其中的一个记录,就要把他们相同的专题(news_key)的关键字找出来。以逗号为分隔符,也就是说一条记录可以属有多个关键字(news_key),其中只要有一个相同就行呢。
      

  2.   

    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
      

  3.   

    谢谢
    回复人: xluzhong(打麻将一缺三,咋办?) ( ) 信誉:100