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?
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.
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
> ===============================================================
-- ======================================== Brian Peasland Raytheons Systems at USGS EROS Data Center These opinions are my own and do not necessarily reflect the opinions of my company! ========================================Received on Fri May 19 2000 - 00:00:00 CDT
![]() |
![]() |