今天看到通过逗号来将表进行连接的情况,就想到了对比下JOIN的区别:

表格是之前那个学生,成绩的例子.对比如下的几个语句:

发现逗号的方式就是对应Inner Join的情况.

select * from Student,SC where Student.SId=SC.SId;

SQL联表的方式(逗号, Left Join, Right Join)

 

 

 

select * from Student right join SC on Student.SId=SC.SId;

SQL联表的方式(逗号, Left Join, Right Join)

 

select * from Student left join SC on Student.SId=SC.SId;

SQL联表的方式(逗号, Left Join, Right Join)

相关文章:

  • 2021-11-19
  • 2021-08-25
  • 2022-12-23
  • 2021-12-08
  • 2021-11-19
  • 2022-12-23
猜你喜欢
  • 2022-01-09
  • 2022-12-23
  • 2021-05-21
  • 2021-04-03
  • 2022-01-10
  • 2021-11-17
相关资源
相似解决方案