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

Popular posts from this blog

Oracle WEB ADI Success And Error Counts Not Displayed Correctly

Split CLOB content to lines (new line character as split character)

How to fix the error "signer information does not match signer information of other classes in the same package"