Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to say one of a group of columns is required?
In article <39253643.AB8D06_at_edcmail.cr.usgs.gov>, Brian Peasland
<peasland_at_edcmail.cr.usgs.gov> writes
>If MY_LOOKUP1 is the column that is required, make it NOT NULL. If your
>requirement is that at least one (any one) of the columns is not null,
>then you need to use a trigger.
It looks like I need the trigger!
Andy
>
>HTH,
>Brian
>
>Andy Hardy wrote:
>>
>> Hi,
>>
>> I have a table with three columns - one or more of which is required.
>>
>> E.G.
>>
>> MY_KEY
>> MY_LOOKUP1
>> MY_LOOKUP2
>> MY_LOOKUP3
>>
>> where at least one of the MY_LOOKUPs is required.
>>
>> Is there a check constraint for this?
>>
>> I'm using Designer/2000 rel 2.1.1 onto an Oracle 7.3.4 database (later
>> moving to 8.1.6 database).
>>
>> Andy
>> --
>> Andy Hardy. PGP ID: 0xA62A4849
>> ===============================================================
>
-- Andy Hardy. PGP ID: 0xA62A4849 ===============================================================Received on Fri May 19 2000 - 00:00:00 CDT