1)where 有多个用in ,一个用=
2)自身链接
select A.Sno
from S A,S B
where A.Sname='a' AND A.City=B.City))
3)外链接(同时输出两个表的数据,不过要有相同项
select P.Pname,SPJ.QTY
from P,SPJ
where SPJ.Pno=P.Pno AND Jno in(
select Jno
from J
where Jname='huang')
1)where 有多个用in ,一个用=
2)自身链接
select A.Sno
from S A,S B
where A.Sname='a' AND A.City=B.City))
3)外链接(同时输出两个表的数据,不过要有相同项
select P.Pname,SPJ.QTY
from P,SPJ
where SPJ.Pno=P.Pno AND Jno in(
select Jno
from J
where Jname='huang')