Code Project

Link Unit

Tuesday, June 03, 2008

Using DBMS_METADATA.GET_DDL to generate the table script

I was using Oracle 10g where it required to get the Scripts of all the tables.
While searching google I ended up with DBMS_METADATA.GET_DDL

SELECT DBMS_METADATA.GET_DDL ('TABLE',tname)';' FROM tab where tabtype='TABLE'

I hope this help the visitors.

No comments: