Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Insert date and time to a table
Would there be any performance issues if I do this:
select * from employee where ename like 'a%' or ename like 'A%'
I mean it would still use indexes, right?
Thanks for all the help guys!
On Wed, 16 Jun 1999 11:18:43 GMT, ToneCzar_at_erols.com (Chris Hamilton) wrote:
>On 15 Jun 1999 18:31:21 PDT, Y2K <y2000_at_pacbell.net> wrote:
>
>>Thanks for the reply!
>>
>>Another quick question: how do I set my Oracle database to be case
>>insensitive?
>>
>>Right now if I do select * from mytable where username like 'a%', it'll
>>return nothing as the initial letter is capital in the username table. I
>>thought Oracle automatically uses case insentivitity. Where do I set this
>>option?
>
>You kind of need to choose all upper or all lower-case for your data.
>Oracle is not case-insensitive when it comes to data. The way you
>write a query can be case-insenstive, that is:
>
>SELECT empname FROM Employee;
>
>is the same as
>
>select EMPNAME from EMPLOYEE;
>
>But the data itself is case-sensitive, as well it should be.
>
>If your data looks like this:
>
>EMPNAME
>-----------------
>smith
>jones
>johnson
>
>You could query like this:
>
>select empname from employee where empname like 'j%'
>or
>select empname from employee where empname like lower(:variable)
>but don't do
>select empname from employee where lower(empname) like :variable
>as this will disable the use of an index on that column for that
>query.
>
>In Oracle 8i, I understand you can build function-based indexes, so
>you could therefore index the empname column to be lower(empname) and
>solve some of your woes!
>
>Chris
>You can
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>Christopher Hamilton
>Oracle DBA -- Wall Street Sports
>chris_at_wallstreetsports.com
>http://www.wallstreetsports.com/
Received on Wed Jun 16 1999 - 21:18:59 CDT
![]() |
![]() |