Home » SQL & PL/SQL » Client Tools » Generate DDL from a select (Oracle 11G solaris 10)
Generate DDL from a select [message #459886] Tue, 08 June 2010 14:27 Go to next message
evoradba
Messages: 111
Registered: April 2005
Location: Canada
Senior Member
Hello
I would like to generate a table & Index ddl using a select statement i did try the following:

select dbms_metadata.get_ddl('TABLE','DEPT','USER') from dual;

However does not provide all the columns in the table only the first one, is there a better way?
thank you
Maria
Re: Generate DDL from a select [message #459887 is a reply to message #459886] Tue, 08 June 2010 14:34 Go to previous messageGo to next message
BlackSwan
Messages: 26564
Registered: January 2009
Location: SoCal
Senior Member
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/

please use COPY & PASTE so we can see what you do & how Oracle responds

SQL> SET LONG 32000
Re: Generate DDL from a select [message #459888 is a reply to message #459886] Tue, 08 June 2010 14:35 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10690
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
It is mostly to do with your display settings.
Try some like
set long 500000000;

and execute the same sql.
Re: Generate DDL from a select [message #459891 is a reply to message #459888] Tue, 08 June 2010 14:48 Go to previous message
evoradba
Messages: 111
Registered: April 2005
Location: Canada
Senior Member
thank you so much it works
Maria
Previous Topic: Installation of Toad 10.1
Next Topic: Connection from Oracle SQL Developer to MS SQL Server
Goto Forum:
  


Current Time: Wed Jul 17 23:32:59 CDT 2019