******************************************
* Description: SQL for Quering Object DDL
* Compatiablity: RDBMS 10g, 11g, 12c
* Date: 11:00 AM EST, 01/11/2017
******************************************

SQL> select dbms_metadata.get_ddl('TABLE','DEPT','SCOTT') from dual;
SQL> select dbms_metadata.get_ddl('INDEX','DEPT_INDEX','SCOTT') from dual;