Sunday, March 25, 2018

How to get table to index structure like toad

Here is the built in which will give you the table or index structure .

How to get tables / Index structure.
SELECT to_char(DBMS_METADATA.GET_DDL ('INDEX', index_name,index_owner))
FROM dba_indexes
WHERE table_owner=upper('APPS');



SELECT to_char(DBMS_METADATA.GET_DDL ('TABLE', TABLE_name, table_owner))
FROM dba_TABLES
WHERE table_owner=upper('ONT');