【发布时间】:2018-11-16 04:36:27
【问题描述】:
我有两个表 Tables1,分别是 ID、name,而 Table2 有 ID1、ID2 和 ID3、name1、name2 和 name3。 我要选择table1.ID在tables2中不存在:ID1、ID2、ID3
select T1.ID,t1.name
from table1 t1
where not exists (
SELECT *
FROM table2 t2
where t1.ID=t2.ID1 or t1.ID=t2.ID2 or or t1.ID=t2.ID3 )
我收到此查询的错误消息
【问题讨论】:
标签: hive subquery conditional-statements not-exists