oracle view source

Solutions on MaxInterview for oracle view source by the best coders in the world

showing results for - "oracle view source"
Jérémie
04 Nov 2019
1-- Views (use USER_VIEWS or DBA_VIEWS if needed):
2SELECT TEXT FROM ALL_VIEWS WHERE upper(VIEW_NAME) LIKE upper('%VIEW_NAME%');
3-- Or:
4SELECT dbms_metadata.get_ddl('VIEW', 'VIEW_NAME', 'OWNER_NAME') FROM DUAL;
5
6-- Materialized views (use USER_VIEWS or DBA_VIEWS if needed):
7SELECT QUERY FROM ALL_MVIEWS WHERE upper(MVIEW_NAME) LIKE upper('%VIEW_NAME%');
8-- Or:
9SELECT dbms_metadata.get_ddl('MATERIALIZED_VIEW', 'VIEW_NAME', 'OWNER_NAME') 
10FROM DUAL;