Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Case insensitive select statement?
Gary wrote:
> I'm trying to select all records beginning with the letters A, B, C, or D,
> but it must be a case insensitive search.
>
> e.g
> select name from table1
> where name like 'a%'
SELECT name
FROM table1
WHERE LOWER(name) like 'a%';
This converts the name column to lower case in the where clause. The problem with this solution is that any index on name will not be used. The better way is to store the data in one case, but of course that's not always possible. Received on Thu Aug 31 2000 - 14:18:56 CDT