Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: NOT NULL restriction and CHECK constraint on same column in 7.3.4
I seem to have discovered that the not null constraint is still required, since if I try to enter a legal value for ID but null for CODE, Oracle allows that, which is not my design intent. If someone else has added perspective on that, I look forward to reading it.
On Fri, 02 Jun 2000 21:18:11 GMT, hoke_at_gse.harvard.edu (Ken Ho) wrote:
>In 7.3.4, I have a table with VARCHAR2(30) columns named ID and CODE
>with these restrictions/constraints:
>
>ID not null
>
>CODE not null
>
>ID & CODE define a unique key for the table
>
>CODE has a CHECK constraint requiring it, after ltrim & rtrim
>operations, to be 7 characters long
>
>
>Is there any functional or design reason to keep the CODE not null
>restriction? The CHECK constraint prevents CODE from being null. The
>format of the CODE data may change in the future, but if so, the CHECK
>constraint on CODE would be updated to continue preventing CODE from
>being null.
Received on Mon Jun 05 2000 - 00:00:00 CDT
![]() |
![]() |