多表连接查询中,有几种连接方式?

如题所述

第1个回答  推荐于2017-10-05
select * from table1 left join select * from table2 on table1.id=table2.id 左连接
select * from table1 right join select * from table2 on table1.id=table2.id 右连接
select * from table1 cross join select * from table2 交叉连接
select * from table1 union join select * from table2 on table1.id=table2.id
select * from table1 where table1.id in (select id from table 2)本回答被提问者采纳
第2个回答  推荐于2017-10-05
select * from table1 left join select * from table2 on table1.id=table2.id 左连接
select * from table1 right join select * from table2 on table1.id=table2.id 右连接
select * from table1 cross join select * from table2 交叉连接
select * from table1 union join select * from table2 on table1.id=table2.id
select * from table1 where table1.id in (select id from table 2)本回答被提问者采纳
相似回答
大家正在搜