首页 > 解决方案 > sql查询获取一个表独有的项目列表

问题描述

select id,name from tab1;
select id,name from tab2;

我想要 tab2 中但不在 tab1 中的所有 id、name 的列表。

我的查询应该是什么?谢谢你的帮助。

标签: sqloracle

解决方案


应该很简单

select id,name from tab2
minus
select id,name from tab1;

推荐阅读