Re: Creating a table with two keys?

From: Muhammad Ahmad Malik <mamalik_at_cs.wmich.edu>
Date: 1996/10/27
Message-ID: <3273E53F.391D_at_cs.wmich.edu>#1/1


Use the following command.

create table class

   (

     semester_code   char(3)     not null,
     course_num      smallint    not null,
     hours           float       not null,
     primary key (semester_code, course_num)
   )

Muhammad Ahmad Malik
Western Michigan University
mamalik_at_cs.wmich.edu - http://www.wmich.edu/frc/ahmad.html +1 (616) 373-3065

Brian Master 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 Sun Oct 27 1996 - 00:00:00 CEST

Original text of this message