学生表: strdent
INSERT INTO book.student VALUES ('1','张三', '66', '3');
INSERT INTO book.student VALUES(2,'李四','88','3');
insert into book.student values(3,'王五','89','2');
课程表:course
insert into book.course values('1','语文');
…
左连接:以student 为基础表
select * from student as s left join course as c on s.Cid=C.ID;
内连接:除去有null 值的数据
select * from student as s inner join course as c on s.Cid = C.ID;
右连接: 以课程表为基础
select * from student as s right join course as c on s.Cid=C.ID;