通俗的讲: A left join B 的连接的记录数与A表的记录数同,不符合条件的B表计录为空 A right join B 的连接的记录数与B表的记录数同 ,不符合条件的A表记录为空 A left join B 等价B right join A 内连接(Inner Join) select *from t_institution iinner join t_teller ton i.inst_no = t.inst_no where i.inst_no = "5801" 其中inner可以省略。 等价于早期的连接语法 select *from t_institution i, t_teller twhere i.inst_no = t.inst_no and i.inst_no = "5801" 外连接Outer Jion 左外连接(Left Outer Jion) select *from t_institution ileft outer join t_teller t on i.inst_no = t.inst_no 其中outer可以省略。 右外连接(Rigt Outer Jion) select *from t_institution iright outer join t_teller t on i.inst_no = t.inst_no
|