Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Are Oracle Varchar2 columns always case-sensitive?
Craig Goldie wrote:
>
> Is there any way of switching off the case-sensitiveness of the data
> held in VARCHAR2 columns? Fro example SQLServer7 seems to have
> case-sensitiveness as an install option.
>
> i.e. I want a query such as:
>
> SELECT * FROM EMPLOYEES
> WHERE NAME = 'FrEd'
>
> and have it return an employee whose name is 'Fred'.
>
> I realise I could do:
>
> SELECT * FROM EMPLOYEES
> WHERE UPPER(NAME) = UPPER('FrEd')
>
> but does this impose any performance hit?
>
> Thanks in advance,
>
> Craig
Oracle is always case-sensitive.
In 8i upwards you can have indexes on functions which will avoid the problems with your second query.
In previous versions, a common workaround is to have a auxilliary column which upper-cases the true column, and then you search on that.
HTH
--
"Some days you're the pigeon, and some days you're the statue." Received on Wed Jan 26 2000 - 08:35:32 CST
![]() |
![]() |