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 -> Function bases index / conatrint - confused

Function bases index / conatrint - confused

From: Martin T. <bilbothebagginsbab5_at_freenet.de>
Date: 10 Nov 2006 04:01:59 -0800
Message-ID: <1163160119.388792.179900@f16g2000cwb.googlegroups.com>


Hi all.
(Oracle 9i2)

I have a name column that up to now had a unique index+constraint to prevent the same names.
I wanted to change this, so that the names get compared case-insensitive.

I can use a function base index to achive this: CREATE UNIQUE INDEX MYTABLE_C1 ON MYTABLE
(LOWER(NAME));
However, prior to now I had the following: CREATE UNIQUE INDEX MYTABLE_C1 ON MYTABLE
(NAME);

ALTER TABLE MYTABLE ADD (
  CONSTRAINT MYTABLE_C1 UNIQUE(NAME)
    USING INDEX); But I cannot create a constraint on lower(..) I have found quite a few examples on the net which explain to use a function based index to enforce similar constraints.

So what problems can arise if I set only a fbi and not also the explicit constraint?

thanks for any pointers.

best regards,
Martin Received on Fri Nov 10 2006 - 06:01:59 CST

Original text of this message

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