【问题标题】:Display output of cursor显示光标输出
【发布时间】:2019-02-07 06:18:13
【问题描述】:

这个程序是我写的

create or replace procedure copia_telefoni2 as

cursor cur_out_tel is 
  select nome as original_list
  from parlamentari;


begin
for n_tel in cur_out_tel loop
  dbms_output.put_line(n_tel.original_list);
end loop;
end copia_telefoni2;

但是当我通过 ide 或 sql*plus 运行这个过程时,系统会返回这个输出

源没有可运行的目标。

相反,如果我在sql*的提示符下运行游标的查询,系统会返回给我一个名称列表。为什么?

【问题讨论】:

    标签: oracle11g sqlplus procedure


    【解决方案1】:

    我自己回答。在sqlplus中,第一次运行函数时,必须运行指令

    设置服务器输出;

    然后必须运行午餐指令的过程

    执行 copia_telefoni2();

    以下在过程中使用sql*plus的调用可以省略第一条指令

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-24
      • 2021-02-26
      • 1970-01-01
      相关资源
      最近更新 更多