Re: multiple primary keys and reference

Поиск
Список
Период
Сортировка
От Achilleus Mantzios
Тема Re: multiple primary keys and reference
Дата
Msg-id Pine.LNX.4.44.0206101735410.11308-100000@matrix.gatewaynet.com
обсуждение исходный текст
Ответ на multiple primary keys and reference  (Matt <matthew.berardi@weilpublishing.com>)
Список pgsql-sql
CREATE TABLE Parts(
PartNo varchar(20) NOT NULL,
machtypesid int4 NOT NULL,
BestPrice decimal(100,2),
Comment text,
PRIMARY KEY (PartNo,machtypesid));

CREATE TABLE MachDefs(
defid serial NOT NULL UNIQUE PRIMARY KEY,
Description text,
PartNo varchar(20),
MachTypeID int4 NOT NULL,
FOREIGN KEY (PartNo,MachTypeID) REFERENCES Parts (PartNo,machtypesid));

-- 
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
tel:    +30-10-8981112
fax:    +30-10-8981877
email:  achill@matrix.gatewaynet.com       mantzios@softlab.ece.ntua.gr



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Efficient DELETE Strategies
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: multiple primary keys and reference