inner join, left join ,right join 结果
假设有两个表结构如下:
表table1
表 table 2
内连接:
--内连接 select * from table1 inner join table2 on table1.ID = table2.ID
结果:
左外连接:
--左连接 select * from table1 left join table2 on table1.ID = table2.ID
结果:
右外连接:
--右连接 select * from table1 right join table2 on table1.ID = table2.ID
结果:
全连接:
select * from table1 full join table2 on table1.ID = table2.ID
结果: