主题:sql嵌套语句的问题
select 名称 as 供应商名称 from 供应商表
where not exists
(select * from 零件表
where not exists
(select * from 供应表
where 供应商编号=供应商表.供应商编号 and 零件编号=零件表.零件编号))
是不是先执行
select * from 零件表
where not exists
(select * from 供应表
where 零件编号=零件表.零件编号)
得到的结果为空
后执行
select 名称 as 供应商名称 from 供应商表
where not exists ......
可整个语句却能得到准确的结果
这语句到底是怎么执行的啊
where not exists
(select * from 零件表
where not exists
(select * from 供应表
where 供应商编号=供应商表.供应商编号 and 零件编号=零件表.零件编号))
是不是先执行
select * from 零件表
where not exists
(select * from 供应表
where 零件编号=零件表.零件编号)
得到的结果为空
后执行
select 名称 as 供应商名称 from 供应商表
where not exists ......
可整个语句却能得到准确的结果
这语句到底是怎么执行的啊