Re: Creating a table with two keys?

From: <mreagan_at_fast.net>
Date: 1996/10/26
Message-ID: <mreagan-2610962239450001_at_10.1.10.3>#1/1


Probably the simplest solution would be to designate one as the primary key using the primary key constraint, and then set the other one as "not null" and create a unique index on that column.

After all, a primary key is a non-null unique column, isn't it?

Matt...

In article <3272A6FE.482D_at_tam2000.tamu.edu>, bem6681_at_tam2000.tamu.edu wrote:

> I know this is probably a simple question, but how do I create a table
> with two primary keys? Here is what I tried, but it doesn't work:
>
> create table class
> (
> semester_code char(3) not null primary key,
> course_num smallint not null primary key,
> hours float not null
> )
>
> Thanks for any help,
>
> Brian Master
  Received on Sat Oct 26 1996 - 00:00:00 CEST

Original text of this message