******************************************
* 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;
SQL> select dbms_metadata.get_ddl('PROCOBJ', 'JOB_NAME', 'SCOTT') from dual;
SQL> select dbms_metadata.get_ddl('PACKAGE_SPEC', 'PACKAGE_BODY_NAME', 'SCOTT') from dual;
SQL> select dbms_metadata.get_ddl('MATERIALIZED_VIEW', 'MV_NAME', 'SCOTT') from dual;