当前位置:网站首页>[team learning] SQL programming language notes - task04

[team learning] SQL programming language notes - task04

2022-06-25 03:56:00 Game programming

【 Team learning 】SQL Programming language notes ——Task04 - The first 1 Zhang

First look at the overall ,Task04 The main points of knowledge are the addition and subtraction of tables and links

【 Team learning 】SQL Programming language notes ——Task04 - The first 2 Zhang

1. The addition and subtraction of tables

1.1 What is set operation ? First of all 、 The execution results of both views and queries are A collection of records , Addition and subtraction are the same as operations .
The basic operation of sets : intersection 、 Combine 、 Difference set 、 Complement set 、 Symmetric difference set 、 Superset 、 A subset of .
1.2 【UNION】 Add / Combine
It should be noted that :UNION Such set operators usually remove Duplicate records , If you do not need to remove duplicate records, you only need to delete them in UNION Add later ALL Key words are enough
1.3 UNION And OR The predicate
I don't seem to understand it in the learning document , Just Baidu :https://zhidao.baidu.com/question/429077726.html Link sent , If there is any suggestion that you still don't understand, understand it by yourself , Summarize my understanding through the article :UNION The data will be sorted out and given to us ,OR Can't , Choose which data you want to use .
1.4 Implicit data type conversion
matters needing attention :hive In the middle of join When connected , Avoid implicit data type conversion for associated columns , Otherwise, it is easy to cause data skew
Attach a link :https://zhuanlan.zhihu.com/p/447472435 It is better to Baidu by yourself
1.5 【INTERSECT】 intersection
MySQL 8.0 Intersection operation is not supported INTERSECT, Need to use inner join To find the intersection
1.6 【EXCEPT】 intersection
MySQL 8.0 Subtraction is not supported EXCEPT operation , They can be borrowed from students NOT IN The predicate
1.7 Symmetry difference : The intersection of two sets can be regarded as the intersection of two sets, and the symmetry difference between the two sets is removed

【 Team learning 】SQL Programming language notes ——Task04 - The first 3 Zhang

2. Link

2.1 Inner link
2.2 External links
2.3 Multi table link
author : No ⃰ say ⃰ Again ⃰ see ⃰

Game programming , A game development favorite ~

If the picture is not displayed for a long time , Please use Chrome Kernel browser .

原网站

版权声明
本文为[Game programming]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206250039263898.html