sql 语句如下:
select * from dev_maindevice where dev_num in (select * from aaa)错误提示:服务器: 消息 116,级别 16,状态 1,行 2
当没有用 EXISTS 引入子查询时,在选择列表中只能指定一个表达式。
请问错误在哪儿。。正确的该怎么样
select * from dev_maindevice where dev_num in (select * from aaa)错误提示:服务器: 消息 116,级别 16,状态 1,行 2
当没有用 EXISTS 引入子查询时,在选择列表中只能指定一个表达式。
请问错误在哪儿。。正确的该怎么样
select * from dev_maindevice where dev_num in (select dev_num from aaa)或
select * from dev_maindevice A
where exists(select top 1 0 from aaa b where a.id=b.id)