| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Check constraint on a foreign key
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
![]() |
![]() |