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: Check constraint question

Re: Check constraint question

From: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 25 Aug 2006 11:31:58 -0700
Message-ID: <1156530717.601981@bubbleator.drizzle.com>


Ed Prochak wrote:
> Andy Hassall wrote:

>> On Thu, 24 Aug 2006 23:08:09 +0200, Ruben Schoenefeld
>> <Ruben.Schoenefeld_at_uni-oldenburg.de> wrote:
>>

> []
>
>>>> Instead of using an "or" and two "and"s, is there an "xor" that I can
>>>> use? Like:
>>>> constraint ck1_signalhead check (mastarm_id xor structure_id)
>>  Curiously, no, Oracle haven't implemented an xor operator; an omission on
>> their part which you have worked around correctly.

>
> Not an ommision by Oracle. There is no such operator in the SQL
> standard.
>
> It might be a nice enhancement though.
>
> Ed

I'm not sure that is true though I'll readily acknowledge that I have yet to test it.

$ cd $ORACLE_HOME/rdbms/admin
$ more stdspec.sql

There you will find, in the definition of the package STANDARD, the following spec.

function XOR (LEFT BOOLEAN, RIGHT BOOLEAN) return BOOLEAN; pragma BUILTIN('XOR',8, 3, 9); -- PEMS_INTEGER, INT_XOR pragma FIPSFLAG('XOR', 1450);

Right between >= and NOT ... so I expect we have it but just don't have it documented.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Fri Aug 25 2006 - 13:31:58 CDT

Original text of this message

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