On Sun, Dec 28, 2003 at 08:21:32PM -0800, Peggy Go wrote: > > 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 > ); See the documentation for primary keys and for CREATE TABLE: http://www.postgresql.org/docs/current/static/ddl-constraints.html#AEN1972 http://www.postgresql.org/docs/current/static/sql-createtable.html -- Michael Fuhr http://www.fuhr.org/~mfuhr/
pgsql-novice by date:
Соглашаюсь с условиями обработки персональных данных