当前位置:网站首页>Get to know MySQL connection query for the first time
Get to know MySQL connection query for the first time
2022-07-05 03:56:00 【parallel】
Classified by function :
Internal connection : Equivalent connection : The result is the intersection of multi table queries
Non equivalent connection
Self join
External connection : The left outer join : Left table is the main table
Right connection : The right table is the main one
Full outer join
Cross connect
sql92 standard : Only internal connections are supported
grammar :
SELECT Query list
FROM surface 1, surface 2...
WHERE Connection condition
AND Connection condition
...
(AND filter )
(GROUP BY Clause
HAVING filter
ORDER BY Clause );sql99 standard :
grammar :
Internal connection :inner( It can be omitted )
External connection : Left lateral :left (outer)
Right outside :right (outer)
Total external :full (outer)
cross :cross
SELECT Query list
FROM surface 1
Connection type join surface 2
on How to connect
....
(WHERE filter
GROUP BY Clause
HAVING filter
ORDER BY Clause );
Such as :
SELECT COUNT(*)
FROM boy
INNER JOIN girl
ON girl.boy_id = boy.id
WHERE boy.age > 25;Be careful :
1. The query result of the external connection is all the records in the main table , If you match it from the right of the table , The value of the match , If not, display null
2. The left outer join and the right outer join can achieve the same effect by exchanging the order of the two tables
边栏推荐
- 已解决(sqlalchemy+pandas.read_sql)AttributeError: ‘Engine‘ object has no attribute ‘execution_options‘
- [安洵杯 2019]不是文件上传
- Clickhouse synchronization MySQL (based on materialization engine)
- 汇编-入门
- Excuse me, my request is a condition update, but it is blocked in the buffer. In this case, can I only flush the cache every time?
- What is test development? Why do so many companies hire test developers now?
- Assembly - getting started
- Soul 3: what is interface testing, how to play interface testing, and how to play interface automation testing?
- ABP vNext microservice architecture detailed tutorial - distributed permission framework (Part 2)
- [groovy] string (string splicing | multi line string)
猜你喜欢

MindFusion. Virtual Keyboard for WPF

UI automation test farewell to manual download of browser driver

输入的查询SQL语句,是如何执行的?
![[wp][introduction] brush weak type questions](/img/d0/9eb3ade701057837d98e4a20082a10.png)
[wp][introduction] brush weak type questions

Plasticscm enterprise crack
![[安洵杯 2019]不是文件上传](/img/f1/736eb5fe51c299e3152ca87895ee99.png)
[安洵杯 2019]不是文件上传

【刷题】BFS题目精选

MindFusion.Virtual Keyboard for WPF
![[software reverse analysis tool] disassembly and decompilation tool](/img/3e/d1ec8f8193c4fb2c790e7e467b4502.png)
[software reverse analysis tool] disassembly and decompilation tool

UI自動化測試從此告別手動下載瀏覽器驅動
随机推荐
An elegant program for Euclid‘s algorithm
Use of vscode software
[wp][introduction] brush weak type questions
How to use jedis of redis
CTF stegano practice stegano 9
Nmap使用手册学习记录
[groovy] string (string type variable definition | character type variable definition)
Zero foundation uses paddlepaddle to build lenet-5 network
Plasticscm enterprise crack
已解决(sqlalchemy+pandas.read_sql)AttributeError: ‘Engine‘ object has no attribute ‘execution_options‘
Interview summary: This is a comprehensive & detailed Android interview guide
[charging station]_ Secular wisdom_ Philosophical wisdom _
[web Audit - source code disclosure] obtain source code methods and use tools
Subversive cognition: what does SRE do?
一文带你了解BI的前世今身与企业数字化转型的关系
Quick start of UI component development of phantom engine [umg/slate]
Smart pointer shared_ PTR and weak_ Difference of PTR
NPM introduction link symbolic link
How is the entered query SQL statement executed?
How about programmers' eyesight| Daily anecdotes