Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you get oracle to generate table schemas

Status
Not open for further replies.

Timcwilcox

Programmer
Jun 28, 2002
12
GB

On SQL7 and Informix you can use commands that generate an SQL script to create tables, based on a existing table, e.g you have a table called orders and you generate a file orders.sql that will create the table orders on another machine.

Can you do the same with oracle 8.0.5 as i can not find out how?
 
You can use CREATE TABLE Y.ORDERS AS SELECT * FROM X.ORDERS, with a db link if necessary.

Naith
 
Thanks for the info, but perhaps i should have said that the machines are not linked which is why i want to generate the sql scripts.
 
You can use Export and Import utilities (EXP and IMP).
With these utilities you can specify the tables you want to export. In Import, you can also specify that you do not want to import data.
If you just want a script, you may use DBA studio (Oracle Enterprise Manager), right click on the table, "show object DDL).
TOAD is also a good tool for that
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top