Use the DBMS_METADATA package's GET_DDL procedure to get DDL of the object
SELECT DBMS_METADATA.GET_DDL('OBJECT_TYPE','OBJECT_NAME','OWNER') FROM DUAL;
Where
OBJECT_TYPE ----> table in above case
OBJECT_NAME ----> name of table
OWNER ----> Owner of table.
Similary for Views
Snap above shows the usage of DBMS_METADATA.GET_DDL to get definition of table |
SELECT DBMS_METADATA.GET_DDL('OBJECT_TYPE','OBJECT_NAME','OWNER') FROM DUAL;
Where
OBJECT_TYPE ----> table in above case
OBJECT_NAME ----> name of table
OWNER ----> Owner of table.
Similary for Views
No comments:
Post a Comment