Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL question
DA Morgan schrieb am 03.05.2005 in <1115142736.427446_at_yasure>:
[self referencing tables]
> Take a look at the following syntax:
> ALTER TABLE person
> ADD CONSTRAINT fkocd_person_state_zip
> FOREIGN KEY (per_state, per_zip)
> REFERENCES state_zip (state, zip_code)
> ON DELETE CASCADE;
> and
> ALTER TABLE person
> ADD CONSTRAINT fkdsn_person_state_zip
> FOREIGN KEY (per_state, per_zip)
> REFERENCES state_zip (state, zip_code)
> ON DELETE SET NULL;
> Might these help?
Only for question, did anybody try this out for self referencing tables, especially for those, that contain a selfreference in one row?
Andreas
-- wenn email, dann AndreasMosmann <bei> web <punkt> deReceived on Wed May 04 2005 - 01:49:49 CDT