Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: unique index on upper
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