How to get the View definition without losing their alias names
If we use
SELECT text FROM all_views WHERE view_name='ORG_ORGANIZATION_DEFINITIONS';
This will not have the alias names given while creating the view. TO avoid this, use the below statement to get the Original DDL statement
SELECT dbms_metadata.get_ddl( 'VIEW', 'ORG_ORGANIZATION_DEFINITIONS', 'APPS') FROM dual;
Refer: DBMS_METADATA for more details on how to use the API and more options.
Comments
Post a Comment