1.innerjoin(内连接,或等值连接)
select * from table1 inner join table2 on table1.column1= table2.column2;
2.left join(左连接)
select * from table1left join table2 on table1.column1= table2.column2;
3.right join(右连接)
select * from table1 right join table2 on table1.column1= table2.column2;
4.select并集
select * from table1left join table2 on table1.column1= table2.column2 union select * from table1 right join table2 on table1.column1= table2.column2;
原文地址:http://blog.51cto.com/13803166/2141845
时间: 2024-10-17 10:10:40