Home » SQL & PL/SQL » SQL & PL/SQL » Generating DDLs of Existing tables
Generating DDLs of Existing tables [message #20646] Mon, 10 June 2002 20:15 Go to next message
P.Deshmukh
Messages: 17
Registered: March 2002
Junior Member
Hello everybody,
We can take the source of views,stored procedures,packages,triggers from data dictionary. But,how can generate DDLs of existing table with all existing constraints?
Pl. help me out, thanks in advance!
Re: Generating DDLs of Existing tables [message #20649 is a reply to message #20646] Tue, 11 June 2002 03:26 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
There are such tools as TOAD/SQL Navigator.... (I mention these, but there are more of them). At the Quest website, you can download a trial version.

And on the other hand, in Oracle9i you have DBMS_METADATA which takes care of this for you.

Perhaps, you could create a similar script on your own, all information is provided in user_tables, user_constraints, user_triggers. But user_triggers and user_constraints contain LONG fields, that could complicate things a bit.

HTH,
MHE
Re: Generating DDLs of Existing tables [message #20658 is a reply to message #20646] Tue, 11 June 2002 09:41 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
exp scott/tiger tables=t1,t2 rows=n file=tmp.dmp
imp scott/tiger file=tmp.dmp indexfile=tmp.sql
Previous Topic: eliminate duplicate records in reporting
Next Topic: Re: What is wrong with my logic?
Goto Forum:
  


Current Time: Thu Apr 25 04:41:44 CDT 2024