当前位置:网站首页>SQL外连接之交集、并集、差集查询
SQL外连接之交集、并集、差集查询
2022-08-05 10:10:00 【且行且安~】
接上一小节的内容,重点讲述了外连接的类型,外连接的语法结构,本小节将会在外连接的基础上,重点阐述下交集、并集、差集查询。
1、交集
交集的示意图如下:
语法结构为:
A、B的交集: select * from A inner jion B on A.col = B.col
2、差集
差集在工作中,可能使用的场景会较多一些。
A相对于B的差集,示意图如下:
差集的语法结构如下:
A相对于B 的差集:select * from A LEFT join B on A.col = B.col where B.col is null
3、并集
并集的示意图如下:
并集的语法结构如下:
A、B的并集:select*from A full outer join B on A.col = B.col
边栏推荐
- Handwriting Currying - toString Comprehension
- 创建一个 Dapp,为什么要选择波卡?
- SMB + SMB2: Accessing shares return an error after prolonged idle period
- Pytorch Deep Learning Quick Start Tutorial -- Mound Tutorial Notes (3)
- NowCoderTOP35-40——持续更新ing
- Jenkins manual (2) - software configuration
- 第五章:多线程通信—wait和notify
- Which big guy has the 11G GI and ojvm patches in April or January 2020, please help?
- 长达四年的减肥记录
- 语音社交软件开发——充分发挥其价值
猜你喜欢
【MindSpore Easy-Diantong Robot-01】You may have seen many knowledge quiz robots, but this one is a bit different
气象数据数据处理实例——matlab字符串切割匹配与R语言日期匹配(数据拼接)
19. Server-side session technology Session
阿里全新推出:微服务突击手册,把所有操作都写出来了PDF
leetcode: 529. Minesweeper Game
这份阿里强推的并发编程知识点笔记,将是你拿大厂offer的突破口
three.js debugging tool dat.gui use
Egg framework usage (1)
5.部署web项目到云服务器
【AGC】增长服务1-远程配置示例
随机推荐
Tanabata romantic date without overtime, RPA robot helps you get the job done
Brief Analysis of WSGI Protocol
Qiu Jun, CEO of Eggplant Technology: Focus on users and make products that users really need
Data Middle Office Construction (10): Data Security Management
浅析WSGI协议
Getting started with Polkadot parachain development, this article is enough
创建一个 Dapp,为什么要选择波卡?
NowCoderTOP35-40——持续更新ing
长达四年的减肥记录
Microservice Technology Stack
dotnet OpenXML parsing PPT charts Getting started with area charts
ffmpeg drawtext 添加文本水印
MySQL事务
韦东山 数码相框 项目学习(六)tslib的移植
linux下oracle常见操作以及日常积累知识点(函数、定时任务)
The JVM collection that Alibaba's top architects have summarized for many years, where can't I check it!
How does the official account operate and maintain?Public account operation and maintenance professional team
The founder of the DFINITY Foundation talks about the ups and downs of the bear market, and where should DeFi projects go?
Offensive World-PWN-new_easypwn
技术干货 | 基于 MindSpore 实现图像分割之豪斯多夫距离