2

SQL Server has a way to let you "export" an existing table's schema, in the form of its necessary SQL "Create Table" commands.

How do you do this in Oracle? Is there a nice automated way of doing it?

3 Answers 3

3

SQL Server parallels to Oracle DBMS_METADATA.GET_DDL?

Gives a good example.

Sign up to request clarification or add additional context in comments.

Comments

3

Using a tool like SQL Developer or Toad is probably simplest. But the information is all available in the data dictionary. In particular, check the documentation for DBMS_METADATA.get_ddl. Something like

select dbms_metadata.get_ddl ('TABLE',myschema,mytab) from dual; 

should do what you want.

Comments

2

You can use SQLDeveloper for this. It is freely available and you can just right click on the table and can export the DDL query,export data in various format,etc.

Below is the link to sample Export HOW-To http://www.oracle.com/technology/products/database/sql_developer/howtos/export_intro.htm

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.