【发布时间】:2017-11-26 15:09:55
【问题描述】:
假设我有 2 个表,如下所示。现在,如果我想获得 sql 将给出的结果,insert into B where id not in(select id from A)
这将在表 B 中插入 3 George。
如何在 hive 中实现这一点?
表 A
id name
1 Rahul
2 Keshav
3 George
表 B
id name
1 Rahul
2 Keshav
4 Yogesh
【问题讨论】:
-
我认为this 是一个很好的参考。
-
Philantrovert,arcticwhite 谢谢我理解为 philantrovert 提出的,它可以通过左外连接来完成。
-
@arcticwhite - 这个答案已经过时了。
-
@philantrovert - 这个答案已经过时了。