Re: primary keys
От | Achilleus Mantzios |
---|---|
Тема | Re: primary keys |
Дата | |
Msg-id | Pine.LNX.4.44.0211071626300.7264-100000@matrix.gatewaynet.com обсуждение исходный текст |
Ответ на | primary keys (Huub <v.niekerk@freeler.nl>) |
Список | pgsql-sql |
On Wed, 6 Nov 2002, Huub wrote: > Hi, > > I want to create a table which has 2 columns, and both columns have to > be primary key (or: together they are the primary key). How can I do > this using SQL? Using pgAdminII for Postgres7.2.2 on RH8. I dont know the way in pgAdminII, but from psql simply give: CREATE TABLE foo( name varchar(20) NOT NULL, id int4 NOT NULL, PRIMARY KEY (name,id)); > > Thanks > > Huub > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > ================================================================== Achilleus Mantzios S/W Engineer IT dept Dynacom Tankers Mngmt Nikis 4, Glyfada Athens 16610 Greece tel: +30-10-8981112 fax: +30-10-8981877 email: achill@matrix.gatewaynet.com mantzios@softlab.ece.ntua.gr
В списке pgsql-sql по дате отправления: