Constraint applies, but doesn't work [message #372798] |
Fri, 09 March 2001 12:45 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Thomas P. Otten
Messages: 1 Registered: March 2001
|
Junior Member |
|
|
I am trying to add a constraint to the 'plotted' field in an existing table. I only want values of 'Y' or null. I issue the following statement, which SQLPLUS
accepts without warning, yet the constraint does not work at all. I figured out that it is the 'null' part that it does not like. Does anyone know how to add a constraint where the only possible values are 'Y' and null?
Here is my code:
alter table drawings
add constraint plotted_Y_or_NULL check (plotted in ('Y', null));
Thanks
|
|
|
|