fyqt.net
当前位置:首页 >> hivE union All >>

hivE union All

对两个结果集进行并集操作,包括重复行,不进行排序。 假设是hive库中的两个表,就是将两个表的数据全部合并起来。

在你写的语句末尾加as a表别名即可

create tablelpx_test_a as select id,class from ( select 1 as id, 2 asclass from dual union all select 2 as id, 3 asclass from dual union all select 3 as id, 4 asclass from dual union all select 5 as id, 6 asclass from dual ) a;...

select * into 新表名 from (select * from T1 union all select * from T2) T 就好了 使用子查询得加个标示符

网站首页 | 网站地图
All rights reserved Powered by www.fyqt.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com