create or replace function IsNumber(pStr Varchar2) return number is
p_I Number;
begin
if pStr is null then
return 0;
end if;
p_I := to_Number(pStr);
return 1;
exception
when others then
return 0;
end;
p_I Number;
begin
if pStr is null then
return 0;
end if;
p_I := to_Number(pStr);
return 1;
exception
when others then
return 0;
end;
本文介绍了一个SQL函数,用于检查传入的字符串是否可以转换为数值。如果可以,则返回1,否则返回0。
2万+

被折叠的 条评论
为什么被折叠?



