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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Case-sensitive select statements?

Re: Case-sensitive select statements?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 2000/02/15
Message-ID: <c4uiassv3u7bofuj8nes3n25csbau6q2n2@4ax.com>#1/1

A copy of this was sent to K Stahl <BlueSax_at_Unforgettable.com> (if that email address didn't require changing) On Tue, 15 Feb 2000 07:55:06 -0500, you wrote:

>Cherk wrote:
>>
>> select * from table
>> where upper(name) = 'KIRK'
>>
>> Cherk <andrija.cerkez_at_lijanovici.com> wrote in message news:...
>> > select * from table
>> > where name = upper('Kirk')
>> >
>
>This could cause problems if there is an index on the column 'name'.

No it wouldn't.

where name = upper('Kirk')

would make use of any index on NAME, I don't see what problems this would cause. It is no different then:

where name = 'KIRK'

It is only if you apply a function to a COLUMN in the table that an index on that column might not be used (and whether thats a problem or not depends). see http://osi.oracle.com/~tkyte/article1/index.html for a new 8i feature that allows indexes to be used even when functions are applied to columns....

-- 
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
 
Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation
Received on Tue Feb 15 2000 - 00:00:00 CST

Original text of this message

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