Minus query in HIVE

前端 未结 5 581
清歌不尽
清歌不尽 2020-12-31 20:48

Minus query seems to not work in HIVE.

Tried ex:

select x from abc 
minus 
select x from bcd ; 

Am I doing this wrong or minus que

5条回答
  •  天涯浪人
    2020-12-31 21:23

    NOT EXISTS is supported in HIVE QL.

    Example:

    SELECT col1 FROM table1 WHERE NOT EXISTS SELECT col2 FROM table2 
    WHERE table1.col1 = table2.col2
    

提交回复
热议问题