Connor and Chris will both be at AI World from October 12 to October 17 , the premier Oracle conference of 2025. If you're in Vegas, please come say Hi or pop into our sessions
Thanks for the question, Duke.
Asked: August 05, 2016 - 6:50 pm UTC
Last updated: August 07, 2016 - 8:54 am UTC
Version: 12.1.0.1.0
Viewed 1000+ times
SQL> create materialized view y2 as select y1 as y2 from y1; Materialized view created. SQL> create view y3 as select y2 as y3 from y2; View created. SQL> select name, type, referenced_name, referenced_type from user_dependencies where name like 'Y%'; NAME TYPE REFERENCED REFERENCED_TYPE ---------- -------------------- ---------- -------------------- Y1 VIEW DUAL SYNONYM Y2 MATERIALIZED VIEW Y2 TABLE Y3 VIEW Y2 TABLE
SQL> create view y1 as select 1 as c1 from dual; View created. SQL> create materialized view y2 as select c1 as c2 from y1; Materialized view created. SQL> create or replace view y3 as select c2 as c3 from y2; View created. SQL> select name, type, referenced_name, referenced_type from user_dependencies where name like 'Y%'; NAME TYPE REFERENCED_NAME REFERENCED_TYPE ------------------------------ ------------------ ------------------------------ ------------------------------ Y1 VIEW DUAL SYNONYM Y2 MATERIALIZED VIEW Y2 TABLE Y3 VIEW Y2 TABLE 3 rows selected. SQL> create table y1 as select 1 as c1 from dual; Table created. SQL> create materialized view y2 as select c1 as c2 from y1; Materialized view created. SQL> create or replace view y3 as select c2 as c3 from y2; View created. SQL> select name, type, referenced_name, referenced_type from user_dependencies where name like 'Y%'; NAME TYPE REFERENCED_NAME REFERENCED_TYPE ------------------------------ ------------------ ------------------------------ ------------------------------ Y2 MATERIALIZED VIEW Y1 TABLE Y2 MATERIALIZED VIEW Y2 TABLE Y3 VIEW Y2 TABLE 3 rows selected. SQL>
Check out more PL/SQL tutorials on our LiveSQL tool.
PL/SQL reference manual from the Oracle documentation library