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

Home -> Community -> Usenet -> c.d.o.misc -> Re: unique constraints

Re: unique constraints

From: G.H VITTAL <vittal_at_india.hp.com>
Date: Fri, 09 Apr 1999 14:30:09 +0530
Message-ID: <370DC199.D16575BC@india.hp.com>


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

Original text of this message

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