Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL question

Re: SQL question

From: Andreas Mosmann <keineemails_at_gmx.de>
Date: Wed, 04 May 2005 08:49:49 +0200
Message-ID: <1115189389.5@user.newsoffice.de>


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> de
Received on Wed May 04 2005 - 01:49:49 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US