问题、讲A010A中的10取出

 

--第一个方式to_number regexp_substr

SQL> select to_number(regexp_substr('A010A','[0-9]+')) from dual;
 
TO_NUMBER(REGEXP_SUBSTR('A010A
------------------------------
                            10
Executed in 0.016 seconds

--第二个方式、regexp_replace

SQL> select regexp_replace('010','^0','') from dual;
 
REGEXP_REPLACE('010','^0','')
-----------------------------
10
Executed in 0.031 seconds