要先创建一个函数:
create or replace function Isnumber(P_column in varchar2) return numberis l_t number;begin l_t := to_number(P_column) ; return 1; exception when others then return 0;end;测试,如果返回0,则代表不是数字,如果返回值为1则代表是数字。
select Isnumber('100') from dual;select Isnumber('-100') from dual;select Isnumber('100.01') from dual;select Isnumber('a123') from dual;