Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Insert date and time to a table
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
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
![]() |
![]() |