如何使用一个存储过程调用另一个存储过程,并获得多个返回参数 要使用存储过程A调用另一个实例下的存储过程B,B返回x,y,z三个值,将这三个值给A的三个返回值o,p,q。请问A的存储过程如何写? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 SQL> create or replace procedure proB(x out int,y out int,z out int) 2 as 3 begin 4 x := 1; 5 y := 2; 6 z := 3; 7 dbms_output.put_line(to_char(x)||to_char(y)||to_char(z)); 8 end; 9 /Procedure createdExecuted in 0.032 secondsSQL> SQL> create or replace procedure proA(o out int,p out int,q out int) 2 as 3 t1 int; 4 t2 int; 5 t3 int; 6 begin 7 proB(t1,t2,t3); 8 o := t1+1; 9 p := t2+1; 10 q := t3+1; 11 dbms_output.put_line(to_char(o)||to_char(p)||to_char(q)); 12 end; 13 /Procedure createdExecuted in 0.031 secondsSQL> SQL> declare 2 x1 int; 3 y1 int; 4 z1 int; 5 begin 6 proB(x1,y1,z1); 7 dbms_output.put_line(to_char(x1)||to_char(y1)||to_char(z1)); 8 end; 9 /123123PL/SQL procedure successfully completedExecuted in 0 secondsSQL> SQL> declare 2 o1 int; 3 p1 int; 4 q1 int; 5 begin 6 proA(o1,p1,q1); 7 dbms_output.put_line(to_char(o1)||to_char(p1)||to_char(q1)); 8 end; 9 /123234234PL/SQL procedure successfully completedExecuted in 0 seconds 一直没有找到在ORACLE下嵌套存储过程的语句,谢谢!如果要调用远程数据库上的存储过程那么这句proB(x1,y1,z1);是不是应该修改为proB@dblink1(x1,y1,z1);其中dblink1为创建的数据链路 菜鸟跪求帮助!! asktom的使用 存储过程游标的问题 用游标执行存储过程的问题 触发器不工作 想启动isqlplus,如何配置? 急呀~oracle问题!再线等,然后散分~ 自增量跟我取最大值加1同时更新数据库的冲突怎么避免 关于ORACLE的SESSION数 请教,如何删除 被删除用户的(且忘了表空间名的)表空间? iis6+php+oracle配置始终是ORA-12154: TNS错误。 C++使用OCCI连Oracle10g的错误
SQL> create or replace procedure proB(x out int,y out int,z out int)
2 as
3 begin
4 x := 1;
5 y := 2;
6 z := 3;
7 dbms_output.put_line(to_char(x)||to_char(y)||to_char(z));
8 end;
9 /Procedure createdExecuted in 0.032 secondsSQL>
SQL> create or replace procedure proA(o out int,p out int,q out int)
2 as
3 t1 int;
4 t2 int;
5 t3 int;
6 begin
7 proB(t1,t2,t3);
8 o := t1+1;
9 p := t2+1;
10 q := t3+1;
11 dbms_output.put_line(to_char(o)||to_char(p)||to_char(q));
12 end;
13 /Procedure createdExecuted in 0.031 secondsSQL>
SQL> declare
2 x1 int;
3 y1 int;
4 z1 int;
5 begin
6 proB(x1,y1,z1);
7 dbms_output.put_line(to_char(x1)||to_char(y1)||to_char(z1));
8 end;
9 /123
123PL/SQL procedure successfully completedExecuted in 0 secondsSQL>
SQL> declare
2 o1 int;
3 p1 int;
4 q1 int;
5 begin
6 proA(o1,p1,q1);
7 dbms_output.put_line(to_char(o1)||to_char(p1)||to_char(q1));
8 end;
9 /123
234
234PL/SQL procedure successfully completedExecuted in 0 seconds
如果要调用远程数据库上的存储过程
那么这句
proB(x1,y1,z1);
是不是应该修改为
proB@dblink1(x1,y1,z1);
其中dblink1为创建的数据链路