ITPub博客

首页 > 数据库 > Oracle > 掌握oracle与SQL区别用一加法运算来学习

掌握oracle与SQL区别用一加法运算来学习

原创 Oracle 作者:cosio 时间:2007-08-05 06:35:19 0 删除 编辑
加法运算[@more@]

/*
写一个1+.....+100的加法运算
熟悉写法 loop等用法
*/
declare
num1 int:=0;
i int:=1;
begin
loop
num1:=num1+i;
if(i=100) then
exit;
else
i:=i+1;
end if;
end loop;
dbms_output.put_line('jieguo shi:'||num1);
end;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/101162/viewspace-931780/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-07-13

  • 博文量
    71
  • 访问量
    976098