On Thursday 07 Nov 2002 6:57 am, Huub wrote:
> Hi,
>
> Reading the online manual it doesn't get clear to me: can I or can't I
> define a primary key containing 2 columns, e.g. like:
>
> create table <name> (column1 char(10) not null, column2 char(20) not
> null, primary key (column1, column2))
Yes you can. The place to check this sort of information is in the SQL
Commands reference section of the manuals.
From CREATE TABLE:
"The primary key constraint specifies that a column or columns of a table may
contain only unique (non-duplicate), non-NULL values. "
You might also find the functional and partial indexing features of interest.
--
Richard Huxton