首页 > Linux操作系统 > Linux操作系统 > 执行存储过程,为什么没有输出?
〖现象(Symptom)〗
Step01:存储过程(procedure)p_sub1的创建脚本如下:
create or replace procedure p_sub1
is
begin
dbms_output.put_line('data from subprograme!');
end;
整个存储过程(Stored Procedure)将在屏幕上输出一段内容。
Step02:执行存储过程(procedure)。
SQL> execute p_sub1;
PL/SQL procedure successfully completed.
执行存储过程,没有结果输出。
为什么没有结果输出?
〖原理(Cause) 〗
没有打开serveroutput。
〖方法(Action) 〗
Step01:打开serveroutput。
SQL> set serveroutput on;
Step02:重新执行存储过程。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/13804621/viewspace-351813/ ,如需转载,请注明出处,否则将追究法律责任。