Mis*_*thi 1 sql oracle sql-like
当在oracle中使用LIKE运算符来匹配任何字符时,我不能使用[ 说明符 ]例如.找出以's'或'r'开头的客户名称.所以我们不能将查询写为"select*from emp where customer LIKE'[sr]%'";
我们不能在ORACLE中使用LIKE运算符的"[]"括号吗?
不,LIKE不这样做.
但是你可以使用正则表达式.
select * from emp where REGEXP_LIKE (customer, '^[sr].*');
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
927 次 |
| 最近记录: |