wzdLY

1.内连接

select * from table_a x inner join table_b y on x.a_id = y.b_id

返回两个表关键字x.a_id = y.b_id的交集数据集

2.左连接:left join 是left outer join的简写

select * from table_a x left join table_b y on x.a_id = y.b_id

左连接,左表的记录将会全部表示出来,右表只会显示符合搜索条件x.a_id = y.b_id的记录,右表记录不足的地方均为NULL。

3.右连接:right join 是right outer join的简写

select * from table_a x right join table_b y on x.a_id = y.b_id

右连接,右表的记录将会全部表示出来,左表只会显示符合搜索条件x.a_id = y.b_id的记录,左表记录不足的地方均为NULL。

分类:

技术点:

相关文章:

  • 2021-09-25
  • 2021-09-25
  • 2021-09-25
  • 2021-09-25
  • 2021-09-25
  • 2022-01-07
猜你喜欢
  • 2021-09-25
  • 2021-11-06
  • 2021-11-30
  • 2021-09-25
相关资源
相似解决方案