Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: DDL Commands
"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