当前位置:网站首页>Advanced learning of MySQL -- basics -- multi table query -- self join
Advanced learning of MySQL -- basics -- multi table query -- self join
2022-07-07 00:34:00 【Magic pig 9898】
grammar :
Self connection can be internal connection or external connection
for example
Query employees , And the name of its leader
select a.name , b.name from emp a , emp b where a.managerid = b.id;
in other words , If an employee doesn't have a leader , This employee will not be found out , Isn't that the inner connection
Another example is
Query all employees , And its subordinate leaders , If the employee has no leader , We need to find out
select a.name , b.name from emp a left outer join emp b on a.managerid = b.id;
边栏推荐
- kubernetes部署ldap
- Google, Baidu and Yahoo are general search engines developed by Chinese companies_ Baidu search engine URL
- Model-Free Control
- Idea automatically imports and deletes package settings
- Use source code compilation to install postgresql13.3 database
- 37 pages Digital Village revitalization intelligent agriculture Comprehensive Planning and Construction Scheme
- TypeScript增量编译
- MIT 6.824 - Raft学生指南
- Value Function Approximation
- Liuyongxin report | microbiome data analysis and science communication (7:30 p.m.)
猜你喜欢
[2022 the finest in the whole network] how to test the interface test generally? Process and steps of interface test
37 pages Digital Village revitalization intelligent agriculture Comprehensive Planning and Construction Scheme
从外企离开,我才知道什么叫尊重跟合规…
Business process testing based on functional testing
What is AVL tree?
2021 SASE integration strategic roadmap (I)
The difference between redirectto and navigateto in uniapp
一图看懂对程序员的误解:西方程序员眼中的中国程序员
1000 words selected - interface test basis
uniapp中redirectTo和navigateTo的区别
随机推荐
uniapp中redirectTo和navigateTo的区别
Geo data mining (III) enrichment analysis of go and KEGG using David database
智能运维应用之道,告别企业数字化转型危机
Jenkins' user credentials plug-in installation
DAY TWO
dynamic programming
37页数字乡村振兴智慧农业整体规划建设方案
Wechat applet UploadFile server, wechat applet wx Uploadfile[easy to understand]
A way of writing SQL, update when matching, or insert
JWT signature does not match locally computed signature. JWT validity cannot be asserted and should
Command line kills window process
Uniapp uploads and displays avatars locally, and converts avatars into Base64 format and stores them in MySQL database
1000 words selected - interface test basis
Leecode brushes questions to record interview questions 17.16 massagist
rancher集成ldap,实现统一账号登录
Data analysis course notes (III) array shape and calculation, numpy storage / reading data, indexing, slicing and splicing
Data operation platform - data collection [easy to understand]
Basic information of mujoco
Use source code compilation to install postgresql13.3 database
Mujoco finite state machine and trajectory tracking