1、内连接inner join
select a.name,b.name from table1 a inner join table2 b on a.id=b.id
返回table1和table2表的交集部分
2、左连接left join
select * from table1 a left join table2 b on a.id=b.id
返回table1表的全部内容,如果对应的table2表没有,则展示为null
3、右连接right join
select * from table1 a right join table2 b on a.id =b.id
返回table2表的全部内容,如果对应的table1表没有,则展示为null
4、全连接full join
select * from table1 a full join table2 b on a.id=b.id
返回table1和table2的全部内容,如果对应的表中没有,则展示为null