ITPub博客

首页 > 数据库 > Oracle > oracle存储过程学习

oracle存储过程学习

原创 Oracle 作者:cosio 时间:2008-07-21 09:55:30 0 删除 编辑

----存储过程:

create or replace procedure pro_test_add is
i number;
total number;
begin
i :=1;
total :=0;
for i in 1..100 loop
total := total+i;
end loop;
dbms_output.put_line(total);
end;

--运行提示:ora_000650

用户权限有问题,改为system 执行通过.当然,建议用DBA进行,对该用户进行赋权限的操作.因为system不是很经常动.

--PL/SQL command中运行,提示执行成功,没有数据显示

set serveroutput on;即可!

[@more@]

存储过程.

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

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

注册时间:2008-07-13

  • 博文量
    71
  • 访问量
    976098