当发生除数为零的事件,是否可以用触发器之类的东西发现这个错误,将此列的值赋为零。我之所以这样是因为.. You can handle it by check the exception . 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 create function name_f(p1 number,p2 number)return numberasv_num number;beginif p2=0 thenv_num:=0;elsev_num:=p1/p2;end if;return(v_num);end;/select name_f(col1,col2) num from table; ORACLE递归查询优化 在数据库处于mount状态下如何查询当前数据库下有哪些用户 如何分批插入数据(利用plsql集合变量) matelink 怎么使用啊 请问有没有更好的办法来解决查询一张表的所有字段是否含有某个值 请问谁写过OCI的程序,哪里有OCI的资料下载?请帮助我! ORACLE中函数到底哪里出错了? 谁能告诉我这oracle sql语句的含义? 如何判断oracle数据库需要的最大license 求助!Oracle 8.1.5安装不了了?遇到了ora-04031错误!! 哪儿有Oracle9的教程? 关于oracle的一个问题,很着急,请帮帮我!!!!
return number
as
v_num number;
begin
if p2=0 then
v_num:=0;
else
v_num:=p1/p2;
end if;
return(v_num);
end;
/select name_f(col1,col2) num from table;