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

Home -> Community -> Usenet -> c.d.o.server -> Check constraint on a foreign key

Check constraint on a foreign key

From: <Salva.Brad_at_DIMAC.COM>
Date: Thu, 11 Mar 1999 14:33:22 GMT
Message-ID: <7c8k7i$1gj$1@nnrp1.dejanews.com>

     I have Table 1(Comm Points) and
     Table 2 (Comm Point Types). In Table 1 I have columns address line 1,
     telephone number, and comm point type (foreign key). If the foreign
     key column equals telephone, I only want the column telephone number in
     Table 1 to be populated, if the foreign key equals address then the
     only column which should be populated in Table 1 is address line 1,
     etc.
     I need to know if I can have a database check constraint in Table 1
     using the foreign key column. I believe since the foreign key is
     technically a join to another table (table 2 in my example) I will not
     be able to use a database check constraint.

     I hope this is clear enough! Thanks for any help.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
Received on Thu Mar 11 1999 - 08:33:22 CST

Original text of this message

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