表A:
select * from z_Atable
表B:
select * from z_Btable
表B中有重复数据。
A和B的內连接,即笛卡尔积:
select * from z_Atable join z_Btable
当on 条件为假时的内连接:
select * from z_Atable left join z_Btable on 0
表A作为左表,两表做左连接 left join :
select * from z_Atable a left join z_Btable b on a.Aname = b.Bname
表B作为左表,两表做左连接 left join :
select * from z_Btable a left join z_Atable b on a.Bname = b.Aname