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

Поиск
Список
Период
Сортировка
От Peggy Go
Тема how to set more than two attributes as primary keys in a table
Дата
Msg-id 20031229042132.66509.qmail@web41313.mail.yahoo.com
обсуждение исходный текст
Ответы Re: how to set more than two attributes as primary keys in a table
Re: how to set more than two attributes as primary keys in a table
Список pgsql-novice
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 primary key,
  Num_Players    smallint,
  Player_Num    smallint
);

Thanks!

__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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

Предыдущее
От: Lola Lee
Дата:
Сообщение: Re: Foreign Key Problem
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: how to set more than two attributes as primary keys in a table