当前位置:网站首页>MYSQL06_ Seven join operations and union all of sql99
MYSQL06_ Seven join operations and union all of sql99
2022-07-21 19:16:00 【What you get is a surprise】
- ①. SQL99, grammar ( Recommended )
- If it's a left outer connection , The table on the left of the join condition is also called the main table , The table on the right is called the slave table
- If it's a right outer connection , The table on the right in the join condition is also called the master table , The table on the left is called the slave table
- full join mysql Is not supported , have access to union all Instead of
select Query list
from surface 1 Alias [ Connection type It can be omitted ]
join surface 2 Alias
on Connection condition
[where filter ]
[group by grouping ]
[having filter ]
Internal connection : [inner] join
External connection :
Left lateral :left[outer] join
Right outside :right[outer] join
Total external :full[OUTER] join
- ②. The illustration 7 A connection
- ③. Merge query results utilize UNION keyword , You can give more than one SELECT sentence , And combine their results into a single result set . When merging , The number of columns and data types of the two tables must be the same , And correspond to each other . each SELECT Use... Between statements UNION or UNION ALL Keyword separation
SELECT column,... FROM table1
UNION [ALL]
SELECT column,... FROM table2
④. UNION Operator returns the union of the result sets of two queries , Remove duplicate records
⑤. UNION ALL Operator returns the union of the result sets of two queries . For duplicate parts of two result sets , No weight removal ( Recommended )
边栏推荐
- TiDB 分布式批量解决方案
- Ardunio development - use of soil sensors
- 4、security之自定义数据源
- Emuelec Development Notes
- FTP服務配置
- [information retrieval] implementation of information retrieval system
- EasyExcel如何在项目中导出文件
- Unity - input class
- Software test interview question: in your previous work, what did a software defect (or bug) record contain? How to submit high-quality software bug records?
- Jujube technology he Yifan: what characteristics should NFT infrastructure have?
猜你喜欢
Naixue's tea layout: how to transform the traditional brand of yuancosmos into yuancosmos marketing
程序员第一课“hello word”,你知道网工第一课吗?
分布式.数据库架构
手把手教你安装MySQL数据库
Clickhouse table engine
Clickhouse Fundamentals
FTP service configuration
kubernetes的这几种存储卷,别再傻傻分不清了
[QT入门篇]窗口类的应用
C language -- the use and Simulation of library function qsort
随机推荐
NFS服务配置
软件测试面试题:黑盒测试和白盒测试是软件测试的两种基本方法,请分别说明各自的优点和缺点!
toast_tuple_threshold的疑问
Eight solutions to cross domain problems (the latest and most comprehensive)
TiDB 分布式批量解决方案
Powermock actual combat
论文翻译解读:Anytime Bottom-Up Rule Learning for Knowledge Graph Completion【AnyBURL】
Top 10 NFTs at present
How to realize copyright protection of Digital Collections
[QT入门篇]定时器QTimer类
2022 software testing skills jmeter+ant+jenkins continuous integration and test report generation tutorial
Postgresql源码(64)查询执行——子模块Executor(2)执行前的数据结构和执行过程
Peripheral driver library development notes 44:ddc114 ADC driver
Mapbox GL development tutorial (13): loading 3D surface layers (white mold)
NFT:数字所有权的核心
Essential tools for streamlit Data Science
软件测试面试题:你对测试最大的兴趣在哪里?为什么?
Uniapp dynamically sets the height of the placeholder (in conjunction with the createselectorquery method)
Pytorch deep learning practice lesson 2 / assignment (linear model)
[cloud native kubernetes] how to use health check under kubernetes cluster