我有两张桌子
表格1
name | column
animals | fish
animals | cow
buildings| house
cars | BMW
cars | Ford
表 2
name | column
|
animals | fish
|
buildings| house
cars | Ford
我试图编写一个查询显示缺少的 2 列(宝马和牛),如下所示:
name | column
animals | Cow
Cars | BMW
我试图写这样的查询:
select t1.column
from table 1 t1
where not exists ( select 1 from table2 t2 where t1.column = t2.column)
但它给了我空的结果,任何人都可以修复查询吗?