sql server 2005 中的子查询语句的格式

如题所述

第1个回答  2011-11-29
select * from 表名 where 表名1.列名 in(select 列名 from 表名2 where id=1);
第2个回答  2011-11-29
select 内容
from 表名
where 条件1 in (select 条件1 from 表名 where 条件2)
或者
select 内容
from 表名
where 条件1 exists or not exists or not in or = all (select 条件1 from 表名 where 条件2)
第3个回答  2011-11-29
select *
from table_name1 a
where a.column_name1 in (select column_name2 from table_name2)本回答被提问者采纳
相似回答