分类目录

链接

2024 年 4 月
1234567
891011121314
15161718192021
22232425262728
2930  

近期文章

热门标签

新人福利,免费薅羊毛

left join、inner join中的on与where的区别

sql语句中left join、inner join中的on与where的区别 table a(id, type): id type ---------------------------------- 1 1 2 1 3 2 table b(id, class): id class --------------------------------- 1 1 2 2 sql语句1:select a.*, b.* from a left join b on a.id = b.id and a.type = 1; sql语句2:select a.*, b.* from a left join b on a.id = b.id where a.type = 1; sql语句3:select a.*, b.* from a left join b on a.id = b.id and b.class = 1; sql语句1的执行结果为: a.id a.type b.id b.class ---...

SQL Server 暂无评论 阅读(1,699)