create materialized view t_v as
select t1.*,1 as marker,rowid from t1 t1
union all
select t2.*,2 as marker,rowid from t2 t2;

ORA-00904: "ROWID" invalid identifier

经查询,第一个rowid必须设置一个别名,如下:

create materialized view t_v as
select t1.*,1 as marker,rowid as rid from t1 t1
union all
select t2.*,2 as marker,rowid from t2 t2;

问题解决。

注:也有可能会在refresh的时候出现ora-904,可参考:https://oracleblog.org/working-case/ora920-when-refresh-mview/

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
  • 2021-08-17
  • 2021-08-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-01
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
  • 2021-09-25
  • 2022-12-23
  • 2022-02-01
相关资源
相似解决方案