When using the LIKE operator in oracle for matching anyone of the characters can't I use [ specifier ] For eg. Find out the Customer's name starting with either 's' or 'r' SO we can't write query as " select * from emp where customer LIKE '[sr]%'";
Can't we use "[]" braces with LIKE operator in ORACLE?
No, LIKE does not do that.
But you can use regular expressions.
select * from emp where REGEXP_LIKE (customer, '^[sr].*');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.