hive 中的union all是不能在sql语句的第一层使用的,否则会报 Top level UNION is not supported currently 错误;

例如如下的方式:

select id,name from user where type = 1

union all

select id,name from user where type = 2

 

上面的方式应该使用子查询的方式书写:

select * from

(

select id,name from user where type = 1

union all

select id,name from user where type = 2

) tmp

 

 

相关文章:

  • 2021-09-17
  • 2021-11-02
  • 2022-12-23
  • 2021-08-30
  • 2022-12-23
  • 2021-05-16
  • 2022-02-12
猜你喜欢
  • 2022-12-23
  • 2021-10-26
  • 2021-11-05
  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
  • 2021-06-04
相关资源
相似解决方案