摘要: 使用left join 时,on和where的条件的区别如下 on条件是在生成临时表时使用的条件,不管on中的条件是否为真,都会返回左表中的记录。 where条件是在临时表生成好后,在对临时表进行过滤条件,条件不为真的就全部过滤。 案例: select * from tab1 left join t 阅读全文
posted @ 2021-04-15 21:01 smallzhen 阅读(694) 评论(0) 推荐(0) 编辑