Re: Conditional Constraint?
From: Kenneth Koenraadt <plovmand_at_mail-online.dk>
Date: 23 Dec 2002 06:56:19 -0800
Message-ID: <25fb645f.0212230656.2fab3fdc_at_posting.google.com>
Date: 23 Dec 2002 06:56:19 -0800
Message-ID: <25fb645f.0212230656.2fab3fdc_at_posting.google.com>
wingwong_at_witty.com (wing) wrote in message news:<873e96d6.0212211735.4fd633d5_at_posting.google.com>...
> Hi,
>
> I am new in Oracle and have a query on how to add conditional
> constraint.
>
> Say, I have a simple table Demerit with three fields.
>
> Demerit(DEM_CODE, DEM_DES, POINTS)
> where
> DEM_CODE (N, 2)
> DEM_DES (C, 30)
> POINTS (N, 1)
>
> How to add the following constraint?
>
> All DEM_CODE should carry an integer POINT between 1 to 6 inclusive,
> and DEM_CODE greater than 20 should carry no more than 3 POINT.
>
> Thanks in advance of any ideas and inputs.
>
> Wing
Received on Mon Dec 23 2002 - 15:56:19 CET