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

Home -> Community -> Mailing Lists -> Oracle-L -> Using constant in referential constraint

Using constant in referential constraint

From: אדר יחיאל <adary_at_mehish.co.il>
Date: Sun, 17 Mar 2002 10:43:21 -0800
Message-ID: <F001.0042B984.20020317104321@fatcity.com>


Hello all

We have a table on banks and branches:
BANKS:
BANK_NO number(2)
BRANCH_NO number(3)

We also have clients table for one bank that does not have the BANK_NO in it.
We would like to check from the client table to the BANKS table using constraint like:

ALTER TABLE CLIENTS
 ADD CONSTRAINT CHECK_BRANCH
 FOREIGN KEY (12 , BRANCH_NO)
 REFERENCES BANKS (BANK_NO, BRANCH_NO) where 12 if the bank id in the banks table.

RTFM did not help.

Yechiel Adar, Mehish Computer Services
adary_at_mehish.co.il

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: =?iso-8859-8?Q?=E0=E3=F8_=E9=E7=E9=E0=EC?=   INET: adary_at_mehish.co.il

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Sun Mar 17 2002 - 12:43:21 CST

Original text of this message

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