hive的not in

最近项目需要对数据做打平操作,原有的sql使用了not in,但是hive 不支持 not in,晚上搜索了下使用 left outer join

select * from lefttbl  a left outer join righttbl b on a.name == b.name1  and a.age=b.age1 and a.score = b.score1 where b.name1 is null and  b.age1 is null and b.score1 is null

通过这个发现where条件作用在join后的结果集上,不知道关系性数据库是不是这样,有时间验证下

posted @ 2015-08-13 09:38  高兴的博客  阅读(1453)  评论(0编辑  收藏  举报