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')
posted on 2016-10-19 23:37 Kooing 阅读(399) 评论(0) 编辑 收藏 举报