记忆-oracle多表查询

    表1 连接语句 表2 条件
交叉连接   表名1 cross join 表2  
自然连接   natural  join  
using     using(id)
外连接 left join on
  right join on
内连接   inner join on
并集   select 表1  union    select表2  
  union  all  
差集   minus    
交集   intersect    

举例

select * tb1

 

select * tb2 

 select * from tb1 union all 
select * from tb2

select * from tb1 union
select * from tb2

select * from tb1 minus select * from tb2

select * from tb1 intersect select * from tb2 

表关系分析 

发布了463 篇原创文章 · 获赞 38 · 访问量 6万+

猜你喜欢

转载自blog.csdn.net/xie__jin__cheng/article/details/103476638