Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: select case insensitive
Mariano schrieb:
> Hi to all, I need to execute a select query in case insentive way, for
> example:
> select * from table where name LIKE John
> should gave me all rows with John, JOHN, john and so on.
>
> I've read that usually it's necessary to execute the follow commands:
> alter session set nls_comp=ansi;
> alter session set nls_sort=binary_ci;
>
> Alas nothing changed, I've Oracle Database 10g Express Edition Release
> 10.2.0.1.0.
> Who can help me please?
>
SQL> select * from v$version;
BANNER
SQL> alter session set nls_comp='LINGUISTIC';
Session altered.
SQL> alter session set nls_sort='BINARY_CI';
Session altered.
SQL> with t as (
2 select 'John' john from dual union all 3 select 'john' from dual union all 4 select 'JOHN' from dual
JOHN
Maxim Received on Tue Mar 06 2007 - 15:00:53 CST
![]() |
![]() |