sql - sql查询获取一个表独有的项目列表
问题描述
select id,name from tab1;
select id,name from tab2;
我想要 tab2 中但不在 tab1 中的所有 id、name 的列表。
我的查询应该是什么?谢谢你的帮助。
解决方案
应该很简单
select id,name from tab2
minus
select id,name from tab1;
推荐阅读
- javascript - Javascript文件未链接到PHP文件
- python - TypeError: ‘module’ object is not callable error with ChromeDriver and Chrome using Selenium on macos
- javascript - async await 在 setTimeout 里面 forEach
- html - 如何使用隐藏形式更改布尔值?
- python - 无法删除或删除数据集中的列
- powerbi - 如何在 Power BI Desktop 内的 DAX 中创建具有不同值的计算表
- angular - 如何删除 parcelRequire 未使用 ionic 中的 peerjs 定义
- javascript - R Shiny html画布在页面重新缩放之前未初始化
- r - ggplot - 如何组合来自不同 data.frames 的两个散点图并使用不同的颜色集来识别每个数据帧
- javascript - 如何在jquery中添加带有过渡的文本?