Work with REGEXP_LIKE

Hello
I am confused with the following example of REGEXP_LIKE
create table test_like (nm1 varchar2(11))

insert into test_like values ('AUS' ) ;
insert into test_like values ('ATS' ) ;

select * from test_like where regexp_like(nm1,'*AT*');
The statement SELECT abvoe gives 2records. I don't expect that one folder must be returned by the query above
Please give me a hint on this

Thank you

You don't need *.

select * from test_like where regexp_like(nm1,'AT');

or

SQL> select * from test_like where regexp_like(nm1,'.*AT.*');

NM1
-----------
ATS

Published by: JAC on May 22, 2013 16:19

Your model (* AT *) means, whatever it is - A then - then T zero or more times.

Tags: Database

Similar Questions

Maybe you are looking for