Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Constraint
mike (hillmw_at_charter.net) wrote:
: Trying to make a constraint
: Instead of a constraint like this:
: ALTER TABLE table_A
: ADD CONSTRAINT XFK_table_A_ID FOREIGN KEY (table_A_ID)
: REFERENCES table_B(table_B_ID)
: I'd like to do something like:
: ALTER TABLE table_A
: ADD CONSTRAINT XFK_table_A_ID FOREIGN KEY (table_A_ID)
: REFERENCES
: table_B, table_C where table_B.id=table_C.id and table_C.level='0'
: Does that make any sence?
Sort of, though I've never tried to do anything like that using a simple constraint definition
_however_
you can certainly write a trigger to enforce this.
-- This space not for rent.Received on Thu Mar 24 2005 - 13:55:26 CST