过程中如何调用另一个带有返回值的过程,并想得到这个返回值
解决方案 »
- XP 上安装ORACLE9i 需要什么补丁?
- group by 问题
- long类型传递给varchar,LONG的值大了以后是否会溢出
- oracle数据库 select max(id) from table; 但我的id为varchar类型。得不出正确的id值,请问应该怎么写这句?
- 急:求助纵表转横表
- 行转换为列,跟一般要求不同,请大家看看
- 高手指教,比如一个table 有约束,可是我如何在sqlplus中看到呢?
- ou的tns坏了,能否之重新按装一下?在线等待
- 为什么扣我的信誉分???(顺便散分)
- oracle存储过程 带普通参数 返回数据集
- 一段程序以declare开头可以运行,为何用create procedure就不行?
- oracle 的问题
create or replace procedure sp_test(a int,b out int) is
begin
b:=a+1;
end sp_test;--调用
declare
i int;
begin
sp_test( 1,i );
dbms_output.put_line( i );
end;
请问一下能不能运行包含COMMIT字句的,带OUT值的procedure的远端过程
2 BEGIN
3 IF a='Y' THEN
4 DELETE FROM testuser.tab_test@db_link;
5 b:=1;
6 ELSE
7 b:=0;
8 END IF;
9 END p_Test;
10 /
Procedure created
SQL> set serveroutput on
SQL> declare
2 b int;
3 begin
4 p_test('Y',b);
5 dbms_output.put_line(b);
6 end ;
7 /
1
PL/SQL procedure successfully completed
SQL>
2 BEGIN
3 IF a='Y' THEN
4 DELETE FROM testuser.tab_test@db_link;
5 b:=1;
6 ELSE
7 b:=0;
8 END IF;
9 COMMIT;
10 END p_Test;
11 /
Procedure created
SQL>
SQL> declare
2 b int;
3 begin
4 p_test('Y',b);
5 dbms_output.put_line(b);
6 end ;
7 /
PL/SQL procedure successfully completed
SQL> set serveroutput on
SQL> /
1
PL/SQL procedure successfully completed
SQL>