Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-00001: unique constraint violated
Mohamad SALEH wrote:
>
> screwbai_at_my-deja.com a écrit :
>
> > I figure out this problem. One of the column had a NULL in it. And NULLs
> > are not allowed in a unique index.
>
> Not true as much as Oracle is engaged! I knew it but I have done the
> following on Oracle 8.1.6
>
> create table essai (a integer, b integer, c char(1));
> create unique index uind on essai(a,b);
> insert into essai values(null, null, 'a');
> insert into essai values (null, null, 'b');
> insert into essai values(1, null, 'c');
>
> All of these instructions completed with no problem.
>
Interesting - but what happens when you try to select from this table? I would wager that you can't select those rows by a and/or b. Received on Thu May 18 2000 - 00:00:00 CDT