create or replace procedure test_select
as
begin
  dbms_system.output_line('this is my first proc in oracle !');
end;
为什么说无效呢 ? 当我加上参数的时候又OK 了。create or replace procedure test_select(
     user_name out varchar2,
     user_id in number

as
begin
  dbms_system.output_line('this is my first proc in oracle !');
end;
妹的,这样又OK 了,,,,我擦, ,为什么呢 ?
另外谁给小弟介绍 存储过程的学习资料小弟 不胜感激 。

解决方案 »

  1.   


    --dbms_output.put_line你是不是寫錯了,執行試下
    create or replace procedure test_select
    as
    begin
      dbms_output.put_line('this is my first proc in oracle !');
    end;
    /
    exec test_select;
    /
      

  2.   

    上面贴错 了麻烦大家看下面的, 谢谢不胜感激,
    ---带参数不报错
    create or replace procedure hong(
           user_name out varchar2,
           user_id in number
    )
    as 
    begin 
           select username into user_name from users s  where s.userid =  user_id ;
    end hong; 
    --这个不带参数的JB报错,,,
    create or replace procedure test_selectas
    begin
      dbms_system.output_line('this is my first proc in oracle !');
    end;
      

  3.   

    一楼大侠神速 。
    三克油,,,,,,你知道有啥 好资料么,给小弟一份。发我邮箱?[email protected]
    明天早上结贴,,,谢谢
      

  4.   

     dbms_output.put_line('this is my first proc in oracle !');
      

  5.   

    带参数的真的没错?  dbms_system.output_line 这是自己写?SQL> create or replace procedure test_select
      2
      3  as
      4  begin
      5    dbms_system.output_line('this is my first proc in oracle !');
      6  end;
      7  /Warning: Procedure created with compilation errors.SQL> show error
    Errors for PROCEDURE TEST_SELECT:LINE/COL ERROR
    -------- -----------------------------------------------------------------
    5/3      PLS-00201: identifier 'DBMS_SYSTEM.OUTPUT_LINE' must be declared
    5/3      PL/SQL: Statement ignored
    SQL> create or replace procedure test_select
      2  as
      3  begin
      4    dbms_output.put_line('this is my first proc in oracle !');
      5  end;
      6  /Procedure created.SQL>
      

  6.   

    dbms_output.put_line('this is my first proc in oracle !');