where子句中的多个列在hive中不起作用

时间:2016-08-27 20:01:26

标签: hive

示例1:

Select * from table1 A 
Inner join table2 B On A.id =B.id 
And (A.name,A.Roll_no) not in (select name,roll_no from table2)

示例2:

Select * from table A 
where (A.id,A.name,A.Roll_no) in( Select I'd,name,roll_no from table B )

如果我在where子句中使用两列或更多列来获取结果子查询,则查询不会运行。

2 个答案:

答案 0 :(得分:0)

Hive联接仅适用于equality_expression

如果您需要使用where claus e。

中的那个条件来过滤结果

答案 1 :(得分:0)

Select * from table A 
where concat(A.id,A.name,A.Roll_no) in( Select concat(I'd,name,roll_no) from table B )
相关问题