Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: unique constraints
The reason is you may have data in the table which has got duplicate rows hence
unique index cannot be created.
a ) You can truncate the table and recreate the index alternatively you can search
for duplicate rows using co-related subquery and delete one of the duplicate
regards
vittal
Abiy Alemu wrote:
> Why does the statement
> Create Unique Index <Index_name> on <Table_name>(<Column1>, <Column2>) fails
>
> on an already existing table with data inside ?
>
> Is there a work around for it ?
>
> Bunyip wrote:
>
> > Logically, a Null repersents an UNKNOWN value. Therfore it's value is unique
> > in the sense that it is unknown.
> >
> > B.
> >
> > Prasad wrote in message <37074AB8.23FD_at_inspire.net.nz>...
> > >Hai!
> > >I want to know how oracle reads the null values
> > >on a column defined with unique constraint . Plese clarify whether
> > >null is treated as same or different on each row.
> > >
> > >I will be very much thankful for an early reply
> > >kep
Received on Fri Apr 09 1999 - 04:00:09 CDT