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

Home -> Community -> Usenet -> c.d.o.server -> Re: Insert date and time to a table

Re: Insert date and time to a table

From: Y2K <y2000_at_pacbell.net>
Date: 16 Jun 1999 19:18:59 PDT
Message-ID: <37685b3d.104228953@news.concentric.net>


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

Original text of this message

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