自己写,很简单,数据库并不是万能的

解决方案 »

  1.   

    create function is_num(p in varchar2)
    return boolean
    as
    a number;
    begin
    a:=p-1;
    return true;
    exception
    when others then
    return false;
    end;
    /SQL> set serveroutput on
    SQL> begin
      2  if is_num('121df') then
      3  dbms_output.put_line('正确');
      4  else
      5  dbms_output.put_line('错误');
      6  end if;
      7  end;
      8  /
    错误PL/SQL procedure successfully completedcreate function is_all_char(p in varchar2)
    return boolean
    as
    begin
    for i in 0..9 loop
    if instr(p,'i')>0 then
    return false;
    end if;
    end loop;
    return true;
    end;
    /
    自已测试吧.