数据库在连接两张或以上的表来返回数据时,都会生成一张中间的临时表,然后再将临时表返回给用户left join,right join,inner join, join 与 on 配合用 select col_name.. from tablename1 [inner | left | right] join tablename2 on on_condition select col_name.. from tablename1 left join tablename2 on on_conditio…
Persons 表: Id_P LastName FirstName Address City 1 Adams John Oxford Street London 2 Bush George Fifth Avenue New York 3 Carter Thomas Changan Street Beijing "Orders" 表: Id_O OrderNo Id_P 1 77895 3 2 44678 3 3 22456 1 4 24562 1 5 34764 65 1.inner…