当前位置:网站首页>Union, intersection and difference operations in SQL
Union, intersection and difference operations in SQL
2022-06-26 18:15:00 【yanruo06280】
SQL It's not the same in China 、 hand over 、 Difference operation
1、 hand over ( Corresponding to the intersection operation in the set ,A∩B)
notes : Returns the same part of the query result, that is, their intersection , Want to keep all duplicates , Must use INTERSECT ALL Instead of INTERSECT
(select * from table1) intersect (select * from table2)2、 Difference set ( Corresponding to the difference set operation in the set ,A-B)
notes : Return the row records that are different from the second query result in the first query result ,
That is, the difference set of two results ,EXCEPT The operation automatically removes duplicates , If you want to keep all the repetitions , Must use EXCEPT ALL Instead of EXCEPT..oracle of use minus Realization
(select * from table1) except(select * from table2)3、 Combine ( Corresponding to the union operation in the set ,AUB)
notes :UNION The operation automatically removes duplicates , Want to keep all duplicates , You have to use UNION ALL Instead of UNION
(select * from table1) union(select * from table2)边栏推荐
- 腾讯钱智明:信息流业务中的预训练方法探索与应用实践
- Leetcode interview question 29 clockwise print matrix
- Regular match same character
- Analysis of deep security definition and encryption technology
- Static registration and dynamic registration of JNI
- Comparing the size relationship between two objects turns out to be so fancy
- [QNX] Command
- 必须要掌握的面试重点——索引和事务(附讲B-树与B+树)
- pycharm如何修改多行注释快捷键
- Decompilation of zero time technology smart contract security series articles
猜你喜欢

Dos et détails de la méthode d'attaque

Case study of row lock and isolation level

深入理解MySQL锁与事务隔离级别

数据加密标准DES安全性

ISO documents

Concept and working principle of data encryption standard (DES)

Plt How to keep show() not closed

CLion断点单步调试

深度学习之Numpy篇

transforms. The input of randomcrop() can only be PIL image, not tensor
随机推荐
数字签名标准(DSS)
带你解决哈希冲突,并实现一个简单hash表,
Clion编译catkin_ws(ROS工作空间包的简称)加载CMakeLists.txt出现的问题
ZCMU--1367: Data Structure
分页查询、JOIN关联查询优化
如何创建并强制使用索引
Row lock analysis and deadlock
将字符串B插入字符串A,有多少种插入办法可以使新串是一个回文串
请指教同花顺开户选选择哪家券商比较好?现在在线开户安全么?
Interview key points that must be mastered index and affairs (with B-tree and b+ tree)
Lm06 the mystery of constructing the bottom and top trading strategy only by trading volume
Map and filter methods for processing scarce arrays
[unity] use C in unity to execute external files, such as Exe or bat
sql 中的alter操作总结
RSA概念详解及工具推荐大全 - lmn
陈强:阿里千亿级大规模数字商业知识图谱助力业务增长
Li Kou daily question - day 28 -566 Reshape matrix
Temporarily turn off MySQL cache
Analysis of deep security definition and encryption technology
Detailed explanation of asymmetric cryptosystem