Subject | Re: [firebird-support] Primary Key |
---|---|
Author | Martijn Tonies |
Post date | 2004-01-20T17:13:54Z |
Hi,
(
col1 datatype not null,
col2 datatype not null,
etc...
CONSTRAINT constraintname PRIMARY KEY (col1, col2)
)
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> In a CREATE TABLE statement, what is the proper syntax to make theRECREATE TABLE tablename
> first three (of four) columns the Primary Key?
>
> So far I have the following:
>
> CREATE TABLE MyNewTable (ID1 VARCHAR(16) NOT NULL PRIMARY KEY,
> D1 VARCHAR(8) NOT NULL, D2 VARCHAR(8) NOT NULL, V1 FLOAT);
>
> This, of course, creates my (non-unique!) first column as the
> Primary Key. How do I get the next two columns in there?
(
col1 datatype not null,
col2 datatype not null,
etc...
CONSTRAINT constraintname PRIMARY KEY (col1, col2)
)
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com