Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Q: problem applying constraint
Malcolm Dew-Jones schrieb:
> I wish to enable a not null constraint, but I can't, and I'm wondering
> where I should start looking to solve this. In case it makes a
> difference, the column in question has been added and removed several
> times during development.
>
>
> Connected to:
> Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
> With the Partitioning, OLAP and Oracle Data Mining options
> JServer Release 9.2.0.6.0 - Production
>
>
> SQL> alter table TTT_requests modify RECEIVED_DATE DATE not null ;
> alter table TTT_requests modify RECEIVED_DATE DATE not null
> *
> ERROR at line 1:
> ORA-02296: cannot enable (TTT.) - null values found
>
>
> SQL> select count(*) from TTT_requests where RECEIVED_DATE is null ;
>
> COUNT(*)
> ----------
> 0
>
> 1 row selected.
>
> So, no nulls, but can't enable a not null constraint. Also, I notice the
> message looks odd, "(TTT.)" though I don't know if that is an issue here
> or irrelevent.
>
> Thanks for feedback.
>
>
>
Does
select * from ttt_requests where received_date is null;
yields "no rows selected" as well?
Did you try
alter table TTT_requests modify RECEIVED_DATE DATE not null
exceptions into exceptions;
?
Best regards
Maxim Received on Mon Mar 19 2007 - 12:45:50 CDT
![]() |
![]() |