Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Multiple CREATE TABLE in a .sql
1 CREATE TABLE Constructs
2 (
3 ConstructID INT PRIMARY KEY, 4 RegionID INT, 5 C_Name VARCHAR2(255), 6 C_Option VARCHAR2(255), 7 C_Address VARCHAR2(255), 8 C_Info VARCHAR2(255)9 )
13 RegionID INT PRIMARY KEY, 14 R_Name VARCHAR2(255),
"Joe" <jchvs_at_yahoo.com> wrote in message
news:932n7n$4dd$1_at_merrimack.Dartmouth.EDU...
> Stephen,
>
> You need to put the / between the create table statements, in this is
case
> it would be after line 9. You do not need to use the semicolon. This
worked
> on my 8.1.6 database.
>
> CREATE TABLE Constructs
> (
> ConstructID INT PRIMARY KEY,
> RegionID INT,
> C_Name VARCHAR2(255),
> C_Option VARCHAR2(255),
> C_Address VARCHAR2(255),
> C_Info VARCHAR2(255)
> )
> /
> CREATE TABLE Regions
> (
> RegionID INT PRIMARY KEY,
> R_Name VARCHAR2(255),
> R_Population VARCHAR2(255)
> )
> /
>
> Hope this helps,
> Joe
>
>
> "Stephen Savage" <stephen_at_fuze-media.com> wrote in message
> news:m7556.4395$Ad7.130031_at_sodalite.nbnet.nb.ca...
> > It works if done separately.. but there are about 30 more tables after
these
> > two. It doesnt seem to matter how small or simple they are if there is
more
> > than one it wont work. :P
> >
> > SQL>
> > 1 CREATE TABLE Constructs
> > 2 (
> > 3 ConstructID INT PRIMARY KEY,
> > 4 RegionID INT,
> > 5 C_Name VARCHAR2(255),
> > 6 C_Option VARCHAR2(255),
> > 7 C_Address VARCHAR2(255),
> > 8 C_Info VARCHAR2(255)
> > 9* )
> > 10 /
> >
> > Table created.
> >
> > SQL> CREATE TABLE Regions
> > 2 (
> > 3 RegionID INT PRIMARY KEY,
> > 4 R_Name VARCHAR2(255),
> > 5 R_Population VARCHAR2(255)
> > 6 )
> > 7 /
> >
> > Table created.
> >
> > SQL>
> >
> >
> > "Stephen Savage" <stephen_at_fuze-media.com> wrote in message
> > news:mp356.4373$Ad7.129354_at_sodalite.nbnet.nb.ca...
> > > I'm opening a .SQL file in SQL Plus that has more than one CREATE
TABLE
> > > statement in it. I've tried placing a / at the end of each statement,
but
I
> > > get an error at the beginning of the second statement. I've tried
creating
> > > the tables individually, and it works? Any ideas?
> > >
> > > --
> > > Stephen Savage
> > > stephen_at_fuze-media.com
> > > 506.443.0950 (Main)
> > > 506.443.0951 (Direct)
> > > 506.457.5402 (Pager)
> > >
> > > Fuze Media Inc.
> > > http://www.fuze-media.com
> > > 573 King Street, Suite 2
> > > Fredericton, NB
> > >
> > >
> > >
> >
> >
>
Received on Thu Jan 04 2001 - 14:57:35 CST