2016-01-16 27 views

回答

0

這是affected by your session's NLS_SORT setting,如果你啓用了不區分大小寫的排序,你會得到4結果:

alter session set nls_sort=binary; 
select regexp_instr ('123abc','[A-Z]') 
from dual; 

REGEXP_INSTR('123ABC','[A-Z]') 
------------------------------ 
          0 

alter session set nls_sort=binary_ci; 
select regexp_instr ('123abc','[A-Z]') 
from dual; 

REGEXP_INSTR('123ABC','[A-Z]') 
------------------------------ 
          4 

你可以閱讀更多in the documentation;你也會發現this answer也很有用。

+0

感謝您的快速響應和鏈接! – hayama600