René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback
 

dbms_metadata

dbms_metadata is also known Metadata API. It allows to extract the definitions of database objects.

get_ddl

create table just_a_table (
  foo number  (5,2),
  bar varchar2(10)
);
set long 10000
spool /tmp/re_create_just_a_table.sql
select dbms_metadata.get_ddl('TABLE','JUST_A_TABLE') from dual;
spool off