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 -> Re: Any way to do "unique or null"?

Re: Any way to do "unique or null"?

From: Adrian Shepherd <Adrian.Shepherd_at_BTINTERNET.COM>
Date: Sun, 13 Sep 1998 23:24:29 +0100
Message-ID: <6thgkn$4ag$1@mendelevium.btinternet.com>


Why ?

I would have thought a table constraint to be far more resource friendly than a trigger in terms of CPU usage etc...

As both methods are correct, a constraint isn't a program unit that has to be maintained via source control etc, there is less upkeep needed and it will survive upgrades with a better chance than PL/SQL...

I would like to hear some contradictory views on this, As a senior DBA I am not above being proved wrong for the chance of learning something new...

Regards

Adrian

Reid Lai wrote in message <35F8BFD4.9EBF1D95_at_hk.super.net>...
>You should use BEFORE INSERT trigger to do so instead of constraint.
>
>Roy Smith wrote:
>
>> I've got a column which I want to allow to be null, but if there is a
>> value in it, I want to ensure that value is unique amongst the non-null
>> entries. Can a constraint be used to do this?
>>
>> --
>> Roy Smith <roy_at_popmail.med.nyu.edu>
>> New York University School of Medicine
>
>
>
Received on Sun Sep 13 1998 - 17:24:29 CDT

Original text of this message

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