Monday, 30 March 2015

Query to get the DDL of DB objects in Oracle


select dbms_metadata.get_ddl('TABLE','WC_CUSTOM_DIM_DS','GBBIAPPS2_DW') from dual;

select 'select dbms_metadata.get_ddl(''TABLE'','||''''||table_name||''','||''''||owner||''') from dual union all' from all_tables where owner='INFOREP' and table_name like 'LEVEL1%'

No comments:

Post a Comment