select * 
from Article
where typeid in(select id from Type where ClassList like '200904051623029802,%')
这样?

解决方案 »

  1.   


    会报错的~消息 116,级别 16,状态 1,第 1 行
    当没有用 EXISTS 引入子查询时,在选择列表中只能指定一个表达式。我之前都是过了~~
      

  2.   


    Id是主键,同时也是标识列.查询Id时出现如下错误
    消息 248,级别 16,状态 1,第 1 行
    转换 varchar 值 '200904290204345886' 时溢出了整数列。超过了其中最大的整数值。
      

  3.   


    select * from Article where TypeId in (select * from NewsType where ClassList like '200904051623029802,%')
    这是我写好的.错误提示如下:消息 116,级别 16,状态 1,第 1 行
    当没有用 EXISTS 引入子查询时,在选择列表中只能指定一个表达式。
      

  4.   

    括号内里不能使用*,要用id
    select * from Article where TypeId in (select id from NewsType where ClassList like '200904051623029802,%')
      

  5.   

    select b.classname,a.* 
    from Article a,NewsType b
    where a.TypeId=b.id 
    and b.ClassList like '200904051623029802,%'
      

  6.   

     Article a, NewsType b 是的
      

  7.   

    除了分类名称,还可以把NewsType表中的其他信息加进来