How to extract the table/index definition

Q: How to extract the table definition (DDL statements) from an Oracle database without having to go through a stack of dictionary views?
A: select DBMS_METADATA.GET_DDL('TABLE','<table_name>') from DUAL;

Q: How to extract the index definition (DDL statements) from an Oracle database without having to go through a stack of dictionary views?

A: select DBMS_METADATA.GET_DDL('INDEX','<index_name>') from DUAL;

你可能感兴趣的:(table)