当前位置:网站首页>【组队学习】SQL编程语言笔记——Task04
【组队学习】SQL编程语言笔记——Task04
2022-06-25 03:43:00 【游戏编程】

先看总体,Task04的知识点主要是表的加减法和连结

1.表的加减法
1.1 什么是集合运算?首先表、视图和查询的执行结果都是 记录的集合 ,加减法和运算同理。
集合的基本运算:交集、并集、差集、补集、对称差集、超集、子集。
1.2 【UNION】加法/并集
需要注意的是:UNION 等集合运算符通常都会除去 重复的记录 ,如果不需要除去重复记录只需要在 UNION 后面添加 ALL 关键字就可以了
1.3 UNION 与 OR 谓词
学习文档里我自己看起来不太理解,就百度了一下:https://zhidao.baidu.com/question/429077726.html 链接送上了,如果有依然不理解的建议自行了解清楚哈,总结我通过文章的理解:UNION拿到数据会整理好给我们,OR不会,那你希望拿到的数据是如何就选择用哪个。
1.4 隐式数据类型转换
注意事项:hive中进行join关联时,关联列要避免使用隐式数据类型转换,否则容易导致数据倾斜
附上链接:https://zhuanlan.zhihu.com/p/447472435 更建议自行百度
1.5 【INTERSECT】交集
MySQL 8.0 不支持交集运算INTERSECT,需要用 inner join 来求得交集
1.6 【EXCEPT】交集
MySQL 8.0 不支持减法 EXCEPT 运算,可以借助学过的NOT IN 谓词
1.7 对称差:两个集合的交可以看作是两个集合的并去掉两个集合的对称差

2.连结
2.1 内连结
2.2 外连结
2.3多表连结
作者:不⃰说⃰再⃰见⃰
游戏编程,一个游戏开发收藏夹~
如果图片长时间未显示,请使用Chrome内核浏览器。
边栏推荐
- How can novices of cross-border e-commerce prevent store association? What tool is good?
- DevEco Studio 3.0编辑器配置技巧篇
- Musk was sued for $258billion in MLM claims. TSMC announced the 2nm process. The Chinese Academy of Sciences found that the lunar soil contained water in the form of hydroxyl. Today, more big news is
- 协作+安全+存储,云盒子助力深圳爱德泰重构数据中心
- 存算一体芯片离普及还有多远?听听从业者怎么说 | 对撞派 x 后摩智能
- AI越进化越跟人类大脑像!Meta找到了机器的“前额叶皮层”,AI学者和神经科学家都惊了...
- The file attributes downloaded by the browser are protected. How to remove them
- 西电AI专业排名超清北,南大蝉联全国第一 | 2022软科中国大学专业排名
- Standing at the center of the storm: how to change the engine of Tencent
- 騰訊開源項目「應龍」成Apache頂級項目:前身長期服務微信支付,能hold住百萬億級數據流處理...
猜你喜欢

马斯克被诉传销索赔2580亿美元,台积电公布2nm制程,中科院发现月壤中含有羟基形式的水,今日更多大新闻在此...

Deveco studio 3.0 editor configuration tips

Musk was sued for $258billion in MLM claims. TSMC announced the 2nm process. The Chinese Academy of Sciences found that the lunar soil contained water in the form of hydroxyl. Today, more big news is

Rebeco:使用机器学习预测股票崩盘风险

协作+安全+存储,云盒子助力深圳爱德泰重构数据中心

ICML 2022 | 字节跳动 AI Lab 提出多模态模型:X-VLM,学习视觉和语言的多粒度对齐...

CVPR大会现场纪念孙剑博士,最佳学生论文授予同济阿里,李飞飞获黄煦涛纪念奖...

How to raise key issues in the big talk club?

A new generation of cascadable Ethernet Remote i/o data acquisition module

Disassembly of Weima prospectus: the electric competition has ended and the intelligent qualifying has just begun
随机推荐
完美洗牌问题
用指南针开户如何选择证券公司?哪一个是更安全的
Mobile mall project operation
Amazon's other side in China
How far is the memory computing integrated chip from popularization? Listen to what practitioners say | collision school x post friction intelligence
在线股票开户安全吗?
Peking University has a new president! Gongqihuang, academician of the Chinese Academy of Sciences, took over and was admitted to the Physics Department of Peking University at the age of 15
威马招股书拆解:电动竞争已结束,智能排位赛刚开始
Oracle-sqlload import external data details
AI writes its own code to let agents evolve! The big model of openai has the flavor of "human thought"
Now, the ear is going into the metauniverse
存算一体芯片离普及还有多远?听听从业者怎么说 | 对撞派 x 后摩智能
2点睡10点起不算熬夜?除非你每天都能执行
Is it safe to open an account online? Online and other answers
Three key explanations of overseas e-commerce operation in 2022
ICML 2022 | ByteDance AI Lab proposes a multimodal model: x-vlm, learning multi granularity alignment of vision and language
股票开户,在手机上开户安全吗?
Musk: Twitter should learn from wechat and make 1billion people "live on it" into a super app
亚马逊在中国的另一面
严重的PHP缺陷可导致QNAP NAS 设备遭RCE攻击