多表聯接查詢:內聯接(inner join)、外聯接((left、right、full)outer join)、自聯接(self join)和交叉聯接(cross join)
在查詢上創建新表:select into語句首先創建一個新表,然后用查詢的結果填充新表。
表別名
select coursename from course where courseid in(select distinct courseid from grade where grade>10)
select studname from student where sudbirthday > any (select studbirthday from student where class = '信息系') and class<>'信息系'
select studname from student where exists (select * from grade where studid = student.studid and courseid = '01')
select stud1.* from student as stud1 join student as stud2 on stud2.studname = 'mm' and stud1.studsex = stud2.studsex
select * into girls from student where studsex='m'