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: Question on Check Constraints

Re: Question on Check Constraints

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 08 Mar 1999 20:22:36 GMT
Message-ID: <36e8315b.26138855@192.86.155.100>


A copy of this was sent to "Kevin Donovan" <kdonovan_at_brainiac.com> (if that email address didn't require changing) On Mon, 8 Mar 1999 14:20:52 -0500, you wrote:

>I have a question regarding the construction of check constraints in Oracle
>8.X. Here is the situation: I have 2 tables in an instance, both have the
>same name but different owners. I have a business rule that states that the
>same key cannot exist in both these tables. Is it possible with a check
>constraint to enforce this. If it is, any tips you have on creating this
>would be very helpful.
>
>Thanks
>
>Kevin
>
>

No, you might be able to do this with a trigger but it is trickier then it looks.

If you use a sequence number as the primary key and use the same sequence for both tables -- it'll do the trick as well.  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Mon Mar 08 1999 - 14:22:36 CST

Original text of this message

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