hive实现not in
生活随笔
收集整理的這篇文章主要介紹了
hive实现not in
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
當(dāng)前HIVE 不支持 not in 中包含查詢子句的語法,形如如下的HQ語句是不被支持的:?
查詢?cè)趉ey字段在a表中,但不在b表中的數(shù)據(jù)
select a.key from a where key not in(select key from b) ?該語句在hive中不支持
可以通過left outer join進(jìn)行查詢,(假設(shè)B表中包含另外的一個(gè)字段 key1?
select a.key from a left outer join b on a.key=b.key where b.key1 is null
轉(zhuǎn)載于:https://www.cnblogs.com/ancientmoon/archive/2012/10/10/2718637.html
總結(jié)
以上是生活随笔為你收集整理的hive实现not in的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 超炫的iphone应用UI/UX设计赏析
- 下一篇: tabs标签切换