分类

链接

2024 年 11 月
 123
45678910
11121314151617
18192021222324
252627282930  

近期文章

热门标签

新人福利,免费薅羊毛

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,722)