I want to create indices on a table. I didn't realize it will grow so fast in size that I'm not even able to select a handful of rows. Now, I want this table to be so alike another table. So I want to check the indices and the exact create index statement used on th开发者_开发百科at table.
You can use SQL developer to see the indexes of your tables and export the DDL script (including the create index) of a particular table too.
Another way is to query USER_INDEXES
table using the particular table name and get the DDL using DBMS_METADATA.GET_DDL()
SELECT INDEX_NAME FROM USER_INDEXES WHERE TABLE_NAME LIKE 'MY_TABLE'
SELECT CAST(DBMS_METADATA.GET_DDL('INDEX','PGIT_POLICY_1') AS VARCHAR2(4000))
FROM DUAL
精彩评论