教师表
学生表
左连接:
以左边的表为主,右边的表没有则为null;
右连接:
以右边的表为主,左边的表没有则为null;
内连接:
显示共有信息;
左连接mysql语句:
SELECT * FROM t_student s LEFT JOIN t_teacher t ON s.id=t.id
右连接:
SELECT * FROM t_student s RIGHT JOIN t_teacher t ON s.id=t.id
内连接:
SELECT * FROM t_student s INNER JOIN t_teacher t ON s.id=t.id