Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-00001: unique constraint violated

Re: ORA-00001: unique constraint violated

From: Job <Job_at_pestilence.net>
Date: 2000/05/18
Message-ID: <3923C7CD.F5E01ACE@pestilence.net>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US