Copy structure of a table

How can I copy the stucture of a table to a text file.

Questions by lakshmimadhuri

Showing Answers 1 - 12 of 12 Answers

you can use SPOOL command of Oracle.

spool c:temptest.txt
describe table_name
spool off

After executing the above commad u would fine the definition of the table, table_name in test.txt.

Hope this answers your question.

Cheers,
Srini.

You can copy the definition of objects to text file using dmbs_metadata package.

This is the query to copy emp table definition to text file.

spool textfilename
select dbms_metadata.get_ddl('TABLE','EMP','CMSJAN') from dual;
spool off;



  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions