Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> NOT NULL restriction and CHECK constraint on same column in 7.3.4
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