Link: http://jonathanlewis.wordpress.com/2009/12/31/dbms_metadata/
The dbms_metadata package has a few convenient functions and procedures that allow you to generate the SQL to recreate parts of your database. The best-known function is probably dbms_metadata.get_ddl(), but every example of its use that I’ve seen on the Internet seems to use a “select from dual”, e.g.
select dbms_metadata.get_ddl('TABLE','T1','TEST_USER') from dual;
As a consequence of [...]


