创建测试用表:
CREATE OR REPLACE VIEW v ASSELECT 'A1' AS c FROM DUALUNION ALLSELECT '12B' AS c FROM DUAL;SELECT * FROM v;

SQL代码如下:
SELECT REGEXP_REPLACE(c, '[0-9]', '') AS c1, REGEXP_REPLACE(c, '[^0-9]', '') AS c2 FROM v;
执行结果如下:

创建测试用表:
CREATE OR REPLACE VIEW v ASSELECT 'A1' AS c FROM DUALUNION ALLSELECT '12B' AS c FROM DUAL;SELECT * FROM v;

SQL代码如下:
SELECT REGEXP_REPLACE(c, '[0-9]', '') AS c1, REGEXP_REPLACE(c, '[^0-9]', '') AS c2 FROM v;
执行结果如下:
