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

例子:

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

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

转载于:https://www.cnblogs.com/qadyyj/p/5302608.html

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐