开发者社区> 问答> 正文

MaxCompute 遇到一个这样的问题:

MaxCompute 遇到一个这样的问题:
select * from (

    select   A,B,C  from table1
    union all
    select   A,B, null C  from table2)
    t;

执行类似这样的语句时报这样的错:FAILED: ODPS-0130241:Illegal union operation - Schema of both sides of union should match: Column orgid2 is of type void on first table and type bigint on second table。
就是说我第二条null C,结果C为null,跟第一个C类型不一样。
这个要怎么解决呢?

展开
收起
祁同伟 2017-09-06 16:22:42 3207 0
1 条回答
写回答
取消 提交回答
  • TA有点害羞,没有介绍自己...

    您好,这个报错是说列 orgid2 是void类型的在第一个表中,而在第二个表中是bigint类型的,类型要统一。

    2019-07-17 21:33:56
    赞同 1 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
MaxCompute Next 立即下载
MaxCompute In Alimama载思 立即下载
MaxCompute2.0—从ODPS到MaxCompute 立即下载