Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: How to export table contents in sql statements
If you do a full export, you can get the sql statements for creating objects from an import with ROWS=N. Might need some other switches, haven't done it in a while. Check the manual. jc
In article <39E0BD9B.F16BD153_at_knuut.de>,
"Dipl.-Informatiker Khamis Abuelkomboz" <khamis_at_knuut.de> wrote:
> I have two simple questions (I use oracle/mySQL):
>
> 1. How can I export the schema of a table into SQL statments,
> like
>
> CREATE TABLE Animal (
> ID NUMBER(6) PRIMARY KEY,
> name VARCHAR2(20) UNIQUE,
> legs NUMBER(3),
> insertionDate DATE);
>
> CREATE SEQUENCE AnimalIDs
>
> 2. How can I export the contents of tables to SQL statemtns, so
> that I can load those in a different database, like
>
> INSERT INTO Animal VALUES(AnimalIDS.NEXTVAL, 'cow', 4, SYSDATE);
> INSERT INTO Animal VALUES(AnimalIDS.NEXTVAL, 'tiger', 4, SYSDATE);
> INSERT INTO Animal VALUES(AnimalIDS.NEXTVAL, 'spider', 8, SYSDATE);
>
> thanks,
> khamis
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Oct 09 2000 - 02:04:46 CDT
![]() |
![]() |