Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Check Constraint Problem
Just a brainwave. Do you have, by any chance, a default value of 0 on that
column.
Hth,
Sybrand Bakker, Oracle DBA
Peter C. wrote in message <7grfs0$7qh$1_at_nnrp1.deja.com>...
>I have an interesting phenomenon on an Oracle 7.3.4.3 database.
>
>A table has the following check constraint defined
>
>Constraint Name: SYS_C006174
>Seach Condition: "CHECK(columnA IN(1, 2, 3))"
>
>and the constraint is enabled.
>
>A select dictinct on columnA retrieves the following values
>
>ColumnA
>---------
> 0
>
>??????
>
>When I disable the constraint and try to enable it afterwards I get the
>following:
>
>SQL> alter table article_group disable constraint sys_c006174;
>
>Table altered.
>
>SQL> alter table article_group enable constraint sys_c006174;
>alter table article_group enable constraint sys_c006174
>*
>ERROR at line 1:
>ORA-02293: cannot enable (OPS$STOREP.SYS_C006174) - check constraint
violated
>
>Does someone has an idea how the invalid value got into the column and why
it
>is possible that the constraint was enabled in the first place?
>
>No direct load was done on the database.
>
>Peter
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Thu May 06 1999 - 12:11:50 CDT