当前位置:网站首页>Inner join and outer join of MySQL tables
Inner join and outer join of MySQL tables
2022-06-30 12:20:00 【Xiao Ni-_-】
List of articles
Internal connection
Internal connection is actually the use of where Clause to filter the Cartesian product formed by the two tables , The queries we learned earlier are inner joins , It is also the most used connection query in the development process .
grammar :
select Field from surface 1 inner join surface 2 on Connection condition and Other conditions ;
Case study : Show SMITH Your name and department name
- It was written in the original way

- Standard inner join writing

External connection
The outer connection is divided into left outer connection and right outer connection
The left outer join
If the union query , The table on the left shows that it is a left outer join .
grammar :
select Field name from Table name 1 left join Table name 2 on Connection condition
example :
Build table

Check the grades of all the students , If the student has no grades , Also display the student's personal information

Right connection
If the union query , The table on the right shows that we call it right outer join .
grammar :
select Field from Table name 1 right join Table name 2 on Connection condition ;
example
Yes stu Table and exam Table union query , Show all your grades , Even if there are no students corresponding to this grade , Show it, too

边栏推荐
- 海思3559萬能平臺搭建:獲取數據幀修改後編碼
- Swagger2自动生成APi文档
- 海思3559万能平台搭建:YUV格式简介
- Go zero micro Service Practice Series (VIII. How to handle tens of thousands of order requests per second)
- Building a database model using power designer tools
- Building of Hisilicon 3559 universal platform: obtaining the modified code of data frame
- Biological network analysis using deep learning
- Conference Preview - Huawei 2012 lab global software technology summit - European session
- 使用深度学习进行生物网络分析
- List集合
猜你喜欢
随机推荐
【BUG解决】fiftyone报AttributeError: module ‘cv2‘ has no attribute ‘gapi_wip_gst_GStreamerPipeline‘错误解决方法
[cloud native | kubernetes] in depth understanding of deployment (VIII)
如何使用插件化机制优雅的封装你的请求hook
服务器常用的一些硬件信息(不断更新)
Map collection
STM32 porting the fish component of RT thread Standard Edition
R language ggplot2 visualization: use ggplot2 to visualize the scatter diagram, and_ Set the alpha parameter in the point parameter to specify the transparency level of data points (points transparent
Redis的配置文件及新数据类型
Subtrate 源码追新导读-5月上旬: XCM 正式启用
R language ggplot2 visualization: use ggplot2 to visualize the scatter diagram and use scale_ The size function configures the measurement adjustment range of the size of the data point
AGCO AI frontier promotion (6.30)
R language ggplot2 visualization: use ggplot2 to visualize the scatter diagram, and_ Set show in the point parameter_ The legend parameter is false, and the legend information is not displayed
Another miserable day by kotlin grammar
Talk about how to do hardware compatibility testing and quickly migrate to openeuler?
会议预告 | 华为 2012 实验室全球软件技术峰会-欧洲分会场
Embedded sig | multi OS hybrid deployment framework
Global Capital Market 101:国内高净值人群最好的投资标的之一BREIT
Generate entity classes from SQL Server database tables through EF core framework
Introduction to new features of ES6
List collection








