select * from Article where TypeId in (select * from NewsType where ClassList like '200904051623029802,%') 这是我写好的.错误提示如下:消息 116,级别 16,状态 1,第 1 行 当没有用 EXISTS 引入子查询时,在选择列表中只能指定一个表达式。
括号内里不能使用*,要用id select * from Article where TypeId in (select id from NewsType where ClassList like '200904051623029802,%')
select b.classname,a.* from Article a,NewsType b where a.TypeId=b.id and b.ClassList like '200904051623029802,%'
会报错的~消息 116,级别 16,状态 1,第 1 行
当没有用 EXISTS 引入子查询时,在选择列表中只能指定一个表达式。我之前都是过了~~
Id是主键,同时也是标识列.查询Id时出现如下错误
消息 248,级别 16,状态 1,第 1 行
转换 varchar 值 '200904290204345886' 时溢出了整数列。超过了其中最大的整数值。
select * from Article where TypeId in (select * from NewsType where ClassList like '200904051623029802,%')
这是我写好的.错误提示如下:消息 116,级别 16,状态 1,第 1 行
当没有用 EXISTS 引入子查询时,在选择列表中只能指定一个表达式。
select * from Article where TypeId in (select id from NewsType where ClassList like '200904051623029802,%')
from Article a,NewsType b
where a.TypeId=b.id
and b.ClassList like '200904051623029802,%'