Re: how to set more than two attributes as primary keys in a table

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: how to set more than two attributes as primary keys in a table
Дата
Msg-id 20031229042427.GC4924@wolff.to
обсуждение исходный текст
Ответ на how to set more than two attributes as primary keys in a table  (Peggy Go <shatz_go@yahoo.com>)
Ответы Re: how to set more than two attributes as primary keys in a table
Список pgsql-novice
On Sun, Dec 28, 2003 at 20:21:32 -0800,
  Peggy Go <shatz_go@yahoo.com> wrote:
> Hi!...
>
> Normally, there is only one attribute for the primary
> key but in my table, my primary key is composed of two
> attributes. How do I state this in SQL? What if
> Region_num and Num_Players, combined, should form a
> primary key?
>
CREATE TABLE REGION (
  Region_Num    smallint,
  Num_Players    smallint,
  Player_Num    smallint,
  primary key (Region_Num, Num_Players)
);

В списке pgsql-novice по дате отправления:

Предыдущее
От: Peggy Go
Дата:
Сообщение: how to set more than two attributes as primary keys in a table
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: how to set more than two attributes as primary keys in a table