Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> NOT NULL restriction and CHECK constraint on same column in 7.3.4

NOT NULL restriction and CHECK constraint on same column in 7.3.4

From: Ken Ho <hoke_at_gse.harvard.edu>
Date: 2000/06/02
Message-ID: <39382192.28003168@news.harvard.edu>#1/1

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 Fri Jun 02 2000 - 00:00:00 CDT

Original text of this message

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