====================
内连接
====================
内链接实际上就是利用where子句对两张表形成的笛卡儿积 进行筛选
====================
外连接
====================
===============================
左外连接 left join .. on ..
===============================
左侧的表完全显示
select stu.name,stu.id,exam.grade from stu [left join] exam [on] stu.id=exam.id;
或者
select stu.name,stu.id,exam.grade from stu, exam stu.id=exam.id(+);
===============================
右外连接 right join .. on ..
===============================
右侧的表完全显示
select stu.name,stu.id,exam.grade from stu [right join] exam [on] stu.id=exam.id;
或者
select stu.name,stu.id,exam.grade from stu, exam stu.id(+)=exam.id;
===============================
完全外连接 full outer join ..on..
===============================
完全显示两个表,没有匹配的记录置为空
select stu.name,stu.id,exam.grade from stu [full outer join] exam [on] stu.id=exam.id;