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

Home -> Community -> Usenet -> c.d.o.tools -> How to export table contents in sql statements

How to export table contents in sql statements

From: Dipl.-Informatiker Khamis Abuelkomboz <khamis_at_knuut.de>
Date: Sun, 08 Oct 2000 20:31:55 +0200
Message-ID: <39E0BD9B.F16BD153@knuut.de>

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 Received on Sun Oct 08 2000 - 13:31:55 CDT

Original text of this message

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