Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: DDL Commands

Re: DDL Commands

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Fri, 20 Sep 2002 15:30:56 GMT
Message-ID: <3D8B3F2A.8D5A2C62@exesolutions.com>


"Stéphane DOUSSIERE" wrote:

> Hello,
>
> First I'm french so my english isn't very good.
>
> Is it possible, with one Oracle 8i tool, to generate automatically a file of
> DDL commands of an existing database (CREATE TABLE, CREATE INDEX, CREATE
> VIEW.....................) ?
>
> Thank you for all response.
>
> --
> Stéphane DOUSSIERE

Jim gave you one way ... another is:

SPOOL <some_file_name>

SELECT 'INSERT INTO my_table VALUES (' || '''' || string_field || '''' || ');' FROM source_table

SPOOL OFF For numbers don't concatenate the single quotes '''' around the field and for dates be sure to use TO_CHAR to convert them into strings formatted the way you wish.

And your English is excellent.

Daniel Morgan Received on Fri Sep 20 2002 - 10:30:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US