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: unique index on upper

Re: unique index on upper

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Mon, 04 Dec 2000 20:03:34 +0800
Message-ID: <3A2B8816.100@yahoo.com>

seanldus_at_my-deja.com wrote:
>
> Hi all,
>
> I would like to insure that a field on a table is unique (regardless of
> case) in other words if foo exists, I don't want to be able to insert
> Foo, etc.
>
> To do this would I put an unique index on upper of the field name?
>
> The oracle documentation says that if you want to create a unique
> constraint, that you should do just that(using alter table) and let the
> db create the index rather than using the create index command. Does
> this keep me from making the index on upper?
>
> Any help is appreciated.
>
> Thanks
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

No - the doco is a little out of date...For "normal" indexes, then unique constraints are preferred over unique indexes...However, a unique function based index must be implemented as the name suggests...

HTH

-- 
===========================================
Connor McDonald
http://www.oracledba.co.uk (mirrored at
http://www.oradba.freeserve.co.uk)

"Some days you're the pigeon, some days you're the statue"
Received on Mon Dec 04 2000 - 06:03:34 CST

Original text of this message

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