新建两张表:
表1:student (id,name)
表2:course (id course)
1、左连接 left join
select * from student left join course on student.ID=course.ID
2、右连接 right join
SQL语句:select * from student right join course on student.ID=course.ID
3、完全外连接 full join
select * from student full join course on student.ID=course.ID
4:内连接 join 或 inner join
SQL语句:select * from student inner join course on student.ID=course.ID
相当于:select * from student,course where student.ID=course.ID
5:交叉连接 cross join
select * from student cross join course