Oracle 在安装时一般会集成安装多种工具,其中Sql Plus工具 可用于查看存储过程时的变量值。
我们可以采用dbms_output.put_line() 方法来在相应的存储过程中输出变量,通过执行存储过程查看输出。例如,我们定义一个test 的存储过程
create or replace procedure test as
V_num number;
i number;
begin
V_num := 1;
i := 1;
while i < 10 loop
begin
V_num := V_num + i;
dbms_output.put_line(V_num);
i := i + 1;
end;
end loop;
dbms_output.put_line('this is test');
end test;
在Sql Plus工