当前位置:网站首页>Multiple table connections
Multiple table connections
2022-07-16 03:55:00 【My talented girlfriend】
Table connection introduction
With the development of business , The relationship between tables will be closer and closer , Table connected sql There will be more and more operations , Classification of table connections :
- Internal connection
- External connection
- Cross connect
- Natural join
- Self join
test surface :
test_age surface :
Internal connection
Use join on and where Statement connection . Return the data of both parties
SELECT t.kemu from test t join test_age ta where t.name = ta.name

External connection
The left outer join
left join on : The left outer join , Return all data of the left table , If there is data in the right table, it returns , If it does not exist, a null value is returned .
select t.kemu,e.age from test t LEFT join test_age e on t.name = e.name

Right connection
right join on : Right connection , Return all data of the right table , If there is data in the right table, it returns , If it does not exist, a null value is returned .
select t.kemu,e.age from test t right join test_age e on t.name = e.name

Cross connect
Universal Cartesian product ,cross join
Natural join
USING ON Simplify connection conditions , The connection conditions must be equivalent , Field names must be the same , Same type .
select t.kemu,e.age from test t join test_age e using(name)

边栏推荐
- Power Bi countries / regions SVG coloring map download and use
- C must know and be able to get started - Rewriting of virtual methods and polymorphic usage
- leetcode - 1047. 删除字符串中的所有相邻重复项
- Prometheus operator overview
- The original installation of PHP, MySQL and redis of Huawei cloud
- Improvement and source code analysis of swing transformer V2
- Daily temperature [monotonous stack practice]
- Vectormapnet, an end-to-end vector quantization high definition map learning framework
- C abstract class and abstract method case 0 1
- 盛业首席战略官原野:产业数字化时代,连接比拥有更重要
猜你喜欢

How to evaluate and compare the performance of report tools?

MySQL recovers data from binlog

A grayscale interface migration scheme

选择排序

Figure New Earth loading tilt model can't be seen clearly -- a troubleshooting record of Quadro graphics card

Daily Youxian concentrates resources and focuses on the core Market: seeking profit possibility by retreating

Password key hard coding check

动作捕捉用于丝驱动连续体机器人运动学研究

海南大学张家超教授—基于宏基因组的肠道微生物突变研究(今晚7点半)

leetcode - 678. Valid parenthesis string
随机推荐
MySQL column to row and row to column
Power Bi SVG colored map: from the world to the whole country, provinces, cities, districts and counties, towns, streets and villages, building space operation skills
iMeta期刊部分文章被PubMed收录
[unity3d] text of ugui
焱融全闪 X NVIDIA InfiniBand:打造 AI 时代 GPU 计算的高性能存储技术
Tkinter development example: Custom Mode dialog box
Swin Transformer V2 的改進和源碼分析
深入解析Kubernetes admission webhooks
Power Bi countries / regions SVG coloring map download and use
Vcenter6-exsi6 delete invalid virtual machine
From ECS self built MySQL synchronization to maxcompute synchronization using binlog, after formulating synchronization rules,
网站搬家影响网站排名?怎么更换网站服务器才能避免排名受影响呢
短视频app开发,左滑删除或长按弹出删除选择框
Swin Transformer V2 的改进和源码分析
努力过好今天
Vérification du codage dur de la clé de mot de passe
ASP.NET Core基础一
The listing of Zhongkang holdings on the Hong Kong stock exchange once broke: the market value of the company was HK $2.4 billion
tkinter开发实例:自定义模式对话框
Description of data types and member variables defined in STL mental method 4 vector class