是否有相当于 patindex
的预言机? ?从我的搜索中,唯一接近patindex
的函数是oracle的instr
功能,但不支持通配符。
以下查询的 oracle 等价物是什么?
select patindex('%[^0]%','00194505022')
编辑:我发现了
regexp_instr
具有与patindex
类似的功能.
最佳答案
regexp_instr 使用标准正则表达式语法进行模式匹配。
select regexp_instr('00194505022','[^0].*') from dual;
关于带有通配符的 patindex 和 instr 函数的 oracle 等效项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2769350/