CREATE OR REPLACE FUNCTION isnumeric (str IN VARCHAR2)
RETURN NUMBER
IS
BEGIN
IF str IS NULL
THEN
RETURN 0;
ELSE
IF regexp_like (str, '^(-{0,1}+{0,1})[0-9]+(.{0,1}[0-9]+)$')--数值
/*(str, '^[0-9]*[1-9][0-9]*$') --正整数*/
THEN
RETURN 1;
ELSE
RETURN 0;
END IF;
END IF;
END isnumeric;
用这个自定义函数