Subject | Re: Primary Key |
---|---|
Author | Alexander V.Nevsky |
Post date | 2004-01-20T17:14:13Z |
--- In firebird-support@yahoogroups.com, "drstanl" <drstanl@v...>
wrote:
the same rake (C).
Stan,
CREATE TABLE MyNewTable
(ID1 VARCHAR(16) NOT NULL,
D1 VARCHAR(8) NOT NULL,
D2 VARCHAR(8) NOT NULL,
V1 FLOAT,
Constraint MyNewTable_PK PRIMARY KEY (ID1, D1, D2)
);
Should I tell about multisegment Foreign Keys in advance or you'll
look into Language Reference? ;)
Best regards,
Alexander.
wrote:
> Hi all,the
>
> In a CREATE TABLE statement, what is the proper syntax to make
> first three (of four) columns the Primary Key?MANUAL - book which real programmer reads only after second step on
>
> 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?
the same rake (C).
Stan,
CREATE TABLE MyNewTable
(ID1 VARCHAR(16) NOT NULL,
D1 VARCHAR(8) NOT NULL,
D2 VARCHAR(8) NOT NULL,
V1 FLOAT,
Constraint MyNewTable_PK PRIMARY KEY (ID1, D1, D2)
);
Should I tell about multisegment Foreign Keys in advance or you'll
look into Language Reference? ;)
Best regards,
Alexander.