求至少用了供应商 Sl 所供应的全部零件的工程号 JNO ;
Select jno from
spj spjx
where not exists(
select * from spj spjy
where spjy.sno=’s1’ and not exists(
select * from spj spjz where
spjz.sno=spjy.sno and
spjz.pno=spjy.pno))请问这里为什么要定义第三个变量spj spjz
不能直接用spjx来代替吗?
Select jno from
spj spjx
where not exists(
select * from spj spjy
where spjy.sno=’s1’ and not exists(
select * from spj spjz where
spjz.sno=spjy.sno and
spjz.pno=spjy.pno))请问这里为什么要定义第三个变量spj spjz
不能直接用spjx来代替吗?
为什么要定义spjz 这个别名,直接用spjx不行吗?
Select jno from
spj spjx
where not exists(
select * from spj spjy
where spjy.sno=’s1’ and not exists(
select * from spj spjz where
spjz.sno=spjx.sno and
spjz.pno=spjy.pno))请问这里为什么要定义第三个另名spj spjz
不能直接用spjx来代替吗?改成这样子select * from spjx where
spjx.pno=spjy.pno