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 vs UPPERCASE

Re: Unique vs UPPERCASE

From: Brian Tkatch <SPAMBLOCK.Maxwell_Smart_at_ThePentagon.com.SPAMBLOCK>
Date: Tue, 13 Nov 2001 18:08:05 GMT
Message-ID: <3bf160dd.590758250@news.alt.net>


On Tue, 13 Nov 2001 18:48:42 +0100, "elveru" <elveru_at_yahoo.com> wrote:

>Hello:
>
>I need a column unique, but unique without UPPERCASE or lowercase, example:
>
> NAME (unique) ADD
>....
> BILL Main Street
> Bill <<<=== Washington Street
>
>I need that this situation isn't possible.
>
>Somebody knows what i can do?
>
>Thanks and sorry about English.
>
>
>
>

Use two constraints.

  1. UNIQUE(NAME)
  2. CHECK (Name = LOWER(NAME))

.

In Oracle 8i Enterprise Edition (I am not too familiar with 9i), you can use a Function-Based Index.

CREATE UNIQUE INDEX Moo ON LOWER(MyTable.Name);

Brian Received on Tue Nov 13 2001 - 12:08:05 CST

Original text of this message

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