oracle怎么判讀一個(gè)數(shù)是不是小數(shù)?
selectdecode(instr('1','.')+sign('1'),1,1,0)fromdual;返回1是整數(shù),否則不是createorreplacefunctionf_isnumeric(cntvarchar2)returnnumberasresnumber;flagnumber;beginifcntisnullthenreturn0;endif;selectto_number(cnt)intoresfromdual;selectdecode(instr(res,'.')+sign(res),1,1,0)intoflagfromdual;ifflag=1thenreturn1;elsereturn0;endif;exceptionwhenothersthenreturn0;end;