当前位置:网站首页>2021.7.12笔记 内外连接
2021.7.12笔记 内外连接
2022-07-27 16:10:00 【是吃货不是贝爷】
连接查询


笛卡尔积现象以及限制条件情况

因此需要加限制条件

也可以用重命名方式,增加查找效率(SQL92语法)(即使结果是14条,也需要全部查找玩56条)

SQL99 语法(相同结果):

SQL92和SQL99和等值连接


join前面可以有个inner但是可以省略,但是带着inner可读性更好,表示是内连接
ps:等值连接就是条件是等量关系(如案例中的e.deptno = d.deptno)
非等值连接
条件为非等值关系(这里的inner也是可以省略的)

自连接
查找每个员工的领导(mgr = empno)

King没有领导因此查询结果为13条(总共14条)
外连接
在join前面为left(right)为左(右)连接

三表连接

边栏推荐
- [mit 6.s081] LEC 10: multiprocessors and locking notes
- 深度学习:GCN案例
- 深度学习:GCN(图卷积神经网络)理论学习总结
- zabbix6.0的安装部署
- Dynamic linked list 4 one-way circular linked list (loopsingle Implementation)
- Is it difficult to operate email safely? COREMAIL joins hands with cloud store to create a new ecosystem of corporate email office!
- [MIT 6.S081] Lec 6: Isolation & system call entry/exit 笔记
- 又一个时代的终结!
- Getting started with typora: the most complete tutorial in the whole network
- 【学习笔记】MySQL数据库高级版 - 索引优化、慢查询、锁机制等
猜你喜欢
随机推荐
发布自己的npm组件库
"Who is Huawei" documentary film series landing on BBC: exposing a large number of Ren Zhengfei's unknown experience
Huawei mate30 Pro 5g disassembly: self developed chips account for more than half, and American chips still exist!
Jrs-303 usage
How do corporate giants such as Schneider Electric and L'Oreal make open innovation? Uncover secrets of demo World Innovation Summit
[MIT 6.S081] Lab 3: page tables
OEM "made in the United States", domestic security equipment has been installed on the U.S. aircraft carrier!
2021.8.6笔记 jsoup
Deep learning: gat
[MIT 6.S081] Lab8: locks
[MIT 6.S081] Lec 5: Calling conventions and stack frames RISC-V 笔记
[mit 6.s081] LEC 5: calling conventions and stack frames risc-v notes
又一个时代的终结!
深度学习-视频行为识别:论文阅读——双流网络(Two-stream convolutional networks for action recognition in videos)
[MIT 6.S081] Lec 8: Page faults 笔记
超实用!阿里P9私藏的Kubernetes学习笔记,看完直呼NB
[MIT 6.S081] Lab 7: Multithreading
View port PID and end process
Dynamic linked list 4 one-way circular linked list (loopsingle Implementation)
Deep learning: Gan case exercise -minst handwritten digits



![[MIT 6.S081] Lab 10: mmap](/img/5d/a59a6f723518553b9232bc09991075.png)
![[MIT 6.S081] Lab8: locks](/img/9f/0ff7a0226837a3c420f49e6da8209f.png)


![[MIT 6.S081] Lec 4: Page tables 笔记](/img/30/f1e12d669b656a0b14aa8c7b210085.png)
