写sql的时候经常遇到各种连接查询,left joinright joininner join,做个笔记

left join...on...and...where...and...

on...and...

是对右表中的数据进行筛选,返回的是左表中的所有记录

where...and...

是对on之后的记录进行筛选

inner join

inner join...on...and...where...and...

on...and...

是对两表中的数据进行筛选,返回的是两表中的所匹配的记录

where...and...

是对on之后的的记录进行筛选

相关文章:

  • 2022-12-23
  • 2021-07-02
  • 2022-12-23
  • 2021-06-05
  • 2022-01-19
  • 2021-11-23
  • 2022-12-23
猜你喜欢
  • 2022-02-10
  • 2022-01-13
  • 2022-12-23
  • 2021-04-27
  • 2022-12-23
  • 2021-11-21
相关资源
相似解决方案