oracle存储过程中如何输出变量的值?
我写的一个存储过程老是出错,我想看看其中几个变量的值,怎么看?
谢谢!

解决方案 »

  1.   

    first:
    set serveroutput onsecond:
    in the procedure ,add the pl/sql statement:dbms_output.put_line(variable name)
      

  2.   

    存储过程test的时候 set serveroutput on 是没用的吧?
    在test的时候,有个dbms的tab页是用来接收dbms的输出的
      

  3.   

    before creating the procedure,execute:
    set serveroutput on 
    in the sqlplus
      

  4.   

    存储过程执行有错误:“ORA-01403: 未找到数据”。
    是不是要等到完全执行完成以后才会把数据显示出来?执行到一半发生错误就什么结果都没有?
      

  5.   

    原因很清楚了,无返回值啊,毛病肯定出在select .. into ..这了,把into去了,把select放到sqlplus里执行下就0了
      

  6.   

    两种办法
    1.dbms_output.put_line(变量);
    2.设置个输出参数,将变量赋给这个输出参数。
      

  7.   

    thxfollow your stepssuccess!
      

  8.   

    他妈的 楼主是问,这个输出语句dbms_output.put_line(variable name)是写在哪里?
    是写在存储过程里面,还是在test的时候写!!
    一群白痴!