FK question

From: "Igor Kryltsov" <kryltsov(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: FK question
Date: 2004-08-26 06:48:12
Message-ID: cgk124$mds$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

What is a difference, if any, between:
_________________________________
ALTER TABLE ONLY employee_role
ADD CONSTRAINT fk_survey_id_employee_id FOREIGN KEY (survey_id,
employee_id) REFERENCES employee_survey(survey_id, employee_id) MATCH FULL
ON UPDATE C
ASCADE ON DELETE CASCADE;
__________________________________

AND
___________________________________
ALTER TABLE ONLY employee_role
ADD CONSTRAINT fk_survey_id FOREIGN KEY (survey_id) REFERENCES
employee_survey(survey_id) MATCH FULL ON UPDATE C
ASCADE ON DELETE CASCADE;

ALTER TABLE ONLY employee_role
ADD CONSTRAINT fk_employee_id FOREIGN KEY (employee_id) REFERENCES
employee_survey(employee_id) MATCH FULL ON UPDATE C
ASCADE ON DELETE CASCADE;
_____________________________________

Thank you,

Igor

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bjørn T Johansen 2004-08-26 07:48:33 Alter field type?
Previous Message Fuchs Clemens 2004-08-26 06:30:15 ALTER TABLE - add several columns