当前位置:网站首页>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
边栏推荐
- MySQL winter vacation self-study 2022 11 (10)
- 特殊版:SpreadJS v15.1 VS SpreadJS v15.0
- MySQL winter vacation self-study 2022 11 (9)
- Thread Basics
- Yuancosmic ecological panorama [2022 latest]
- Deep learning - LSTM Foundation
- Assembly - getting started
- 测试开发是什么?为什么现在那么多公司都要招聘测试开发?
- Interview byte, pass the exam and directly work on three sides. As a result, I found an architect to hang me?
- Pyqt5 displays file names and pictures
猜你喜欢

官宣!第三届云原生编程挑战赛正式启动!

深度学习——LSTM基础

为什么百度、阿里这些大厂宁愿花25K招聘应届生,也不愿涨薪5K留住老员工?
![[groovy] string (string type variable definition | character type variable definition)](/img/d8/f02e6ad760fb039873718ff7a97b0a.jpg)
[groovy] string (string type variable definition | character type variable definition)
![[wp]bmzclub几道题的writeup](/img/15/2838b93a605b09d3e2996f6067775c.png)
[wp]bmzclub几道题的writeup

v-if VS v-show 2.0

JWT vulnerability recurrence
![[array]566 Reshape the matrix - simple](/img/3c/593156f5bde67bd56828106d7bed3c.png)
[array]566 Reshape the matrix - simple
![[learning notes] month end operation -gr/ir reorganization](/img/4e/9585b7c62527beaa30a74060cb0e94.jpg)
[learning notes] month end operation -gr/ir reorganization

Is there a sudden failure on the line? How to make emergency diagnosis, troubleshooting and recovery
随机推荐
MySQL winter vacation self-study 2022 11 (9)
NEW:Devart dotConnect ADO. NET
UI自動化測試從此告別手動下載瀏覽器驅動
English essential vocabulary 3400
Web components series (VII) -- life cycle of custom components
[wp][入门]刷弱类型题目
汇编-入门
@The problem of cross database query invalidation caused by transactional annotation
IronXL for .NET 2022.6
Why do some programmers change careers before they are 30?
Learning notes of raspberry pie 4B - IO communication (I2C)
[groovy] string (string injection function | asBoolean | execute | minus)
[groovy] string (string splicing | multi line string)
An elegant program for Euclid‘s algorithm
Resolved (sqlalchemy+pandas.read_sql) attributeerror: 'engine' object has no attribute 'execution_ options‘
[groovy] loop control (number injection function implements loop | times function | upto function | downto function | step function | closure can be written outside as the final parameter)
error Couldn‘t find a package. JSON file in "your path“
请问一下我的请求是条件更新,但在buffer中就被拦截了,这种情况我只能每次去flush缓存么?
优先使用对象组合,而不是类继承
[charging station]_ Secular wisdom_ Philosophical wisdom _