SQL语句中 left join 后用 on 还是 where,区别大了!
共 1945字,需浏览 4分钟
·
2021-04-18 23:53
阅读本文大概需要 2 分钟。
来自:blog.csdn.net/wqc19920906/article/details/79785424
select * from student s left join class c on s.classId=c.id order by s.id
select * from student s left join class c on s.classId=c.id and s.name="张三" order by s.id
select * from student s left join class c on s.classId=c.id and c.name="三年级三班" order by s.id
select * form tab1 left join tab2 on (tab1.size = tab2.size) where tab2.name=’AAA’
select * form tab1 left join tab2 on (tab1.size = tab2.size and tab2.name=’AAA’)
tab1.size = tab2.size
tab2.name=’AAA’
tab1.size = tab2.size and tab2.name=’AAA’
推荐阅读:
无人车成功挑战上海路况,连续5小时不接管,谷歌自动驾驶之父看了都打Call
最近面试BAT,整理一份面试资料《Java面试BATJ通关手册》,覆盖了Java核心技术、JVM、Java并发、SSM、微服务、数据库、数据结构等等。
朕已阅