ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 执行存储过程,为什么没有输出?

执行存储过程,为什么没有输出?

原创 Linux操作系统 作者:zerocool8888888 时间:2008-06-19 01:32:03 0 删除 编辑

〖现象(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/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
暂无介绍

注册时间:2008-04-10

  • 博文量
    73
  • 访问量
    932592