Interbase doesn't need the CONSTRAINT keyword, but Access does
e.g. You can do this in Interbase
CREATE TABLE CourseProg
(
ProgrammeID Integer NOT NULL,
CourseID Integer NOT NULL,
PRIMARY KEY (ProgrammeID, CourseID),
FOREIGN KEY (ProgrammeID) REFERENCES Programme(ProgrammeID),
FOREIGN KEY (CourseID) REFERENCES Course(CourseID)
);
CREATE TABLE table (field1 type [(size)] [NOT NULL] [index1] [, field2 type
[(size)] [NOT NULL] [index2] [, ...]] [, CONSTRAINT multifieldindex [,
...]]));
Single-field constraint:
CONSTRAINT name {PRIMARY KEY | UNIQUE | NOT NULL |
REFERENCES foreigntable [(foreignfield1, foreignfield2)]}
Multiple-field constraint:
CONSTRAINT name
{PRIMARY KEY (primary1[, primary2 [, ...]]) |
UNIQUE (unique1[, unique2 [, ...]]) |
NOT NULL (notnull1[, notnull2 [, ...]]) |
FOREIGN KEY (ref1[, ref2 [, ...]]) REFERENCES foreigntable [(foreignfield1
[, foreignfield2 [, ...]])]}
(these examples from the helpfile)
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Mark Derricutt
> Sent: Friday, 3 December 1999 15:34
> To: Multiple recipients of list database
> Subject: [DUG-DB]: Access and SQL statements
>
>
> 'lo - k, I now myself a large text file with lost of create table and
> insert into statements that make up my database...
>
> Currently the linux box and postgress is busy importing the data, so I
> load access and try the same....
>
>
> But I can't for the life of me find how to run that textfile, I tried
> going "new query" and getting the sql editor window, but that failed doing
> a create table on the 'primary key' clause :(
>
> Any ideas?
>
> --
> Mark Derricutt
> Now Playing: Roine Stolt - The flower king
>
> ------------------------------------------------------------------
> ---------
> New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz