当前位置:网站首页>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)边栏推荐
- 刻录光盘的程序步骤
- 分页查询、JOIN关联查询优化
- Paging query and join Association query optimization
- 数据加密标准(DES)概念及工作原理
- wm_concat()和group_concat()函数
- JS common regular expressions
- Procedure steps for burning a disc
- tag动态规划-刷题预备知识-2. 0-1背包理论基础和二维数组解法模板
- Clion compiling catkin_ WS (short for ROS workspace package) loads cmakelists Txt problems
- Introduction to Ethereum Technology Architecture
猜你喜欢

Numpy之matplotlib

Deep understanding of MySQL lock and transaction isolation level

Let torch cuda. is_ Experience of available() changing from false to true

CD-CompactDisk

Runtimeerror: CUDA error: out of memory own solution (it is estimated that it is not applicable to most people in special circumstances)

CLion断点单步调试

Concept and working principle of data encryption standard (DES)

VCD video disc

必须要掌握的面试重点——索引和事务(附讲B-树与B+树)

50行代码爬取Top500图书导入TXT文档
随机推荐
临时关闭MySQL缓存
Tag dynamic programming - preliminary knowledge for question brushing -2 0-1 knapsack theory foundation and two-dimensional array solution template
同花顺开户怎么样安全吗?怎么炒股开户
Numpy之matplotlib
DoS及攻击方法详解
A little experience of next (ITER (dataloader))
ROS query topic specific content common instructions
深度学习之Numpy篇
Enter n integers and output the number of occurrences greater than or equal to half the length of the array
Solve the problem that each letter occupies a space in pycharm
Clion breakpoint single step debugging
Handwritten promise all
Crawl Douban to read top250 and import it into SqList database (or excel table)
输入n个整数,输出出现次数大于等于数组长度一半的数
MySQL download and configuration MySQL remote control
vutils.make_grid()与黑白图像有关的一个小体会
DVD digital universal disc
sql 中的alter操作总结
最小生成树、最短路径、拓扑排序、关键路径
Decision tree and random forest