Pls how can i spool out table definitions/structure from the database via sqlplus.
Printable View
Pls how can i spool out table definitions/structure from the database via sqlplus.
spool table.txt
desc table_name
spool off
Here's a DBMS_METADATA sample ...
Code:Set Long 100000 Pagesize 0
Execute DBMS_Metadata.Set_Transform_Param(Dbms_Metadata.Session_Transform,'STORAGE',False);
Select DBMS_Metadata.Get_DDL('TABLE',table_name) From user_tables;
Select DBMS_Metadata.Get_DDL('INDEX',index_name) From User_Indexes;
thanx