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

2024-11-29 16:33:32
推荐回答(1个)
回答1:

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)