oracle存储过程的调用注意事项

在调用存储过程的时候,无论存储过程名字后面是否有(),调用的时候都要加上(),这样才能调用这个存储过程

例子:

--这是通过游标来对一个表格的数据进行的调用

create or replace procedure test3 is
Cursor cursor is select id,name from student;
name varchar(20);
begin
for stu in cursor LOOP
begin
dbms_output.put_line(stu.name||stu.id);
end;
end LOOP;
end test3;

调用:

call test3();

结果:

张三 1

李四 2

posted on 2016-03-21 16:47  vbvb520  阅读(132)  评论(0编辑  收藏  举报

导航