oracle export view ddl

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

showing results for - "oracle export view ddl"
Lucia
05 Apr 2017
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;