初用oracle 创建很简单的存储过程报错...感谢大侠来帮帮忙~不差分。
- SQL code
create or replace procedure test_selectasbegin dbms_system.output_line('this is my first proc in oracle !');end;为什么说无效呢 ? 当我加上参数的时候又OK 了。
- SQL code
create or replace procedure test_select( user_name out varchar2, user_id in number)asbegin dbms_system.output_line('this is my first proc in oracle !');end;妹的,这样又OK 了,,,,我擦, ,为什么呢 ?
另外谁给小弟介绍 存储过程的学习资料小弟 不胜感激 。
[解决办法]
- SQL code
--dbms_output.put_line你是不是了,行下create or replace procedure test_selectasbegin dbms_output.put_line('this is my first proc in oracle !');end;/exec test_select;/
[解决办法]
dbms_output.put_line('this is my first proc in oracle !');
[解决办法]
带参数的真的没错? dbms_system.output_line 这是自己写?
- SQL code
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 errorErrors for PROCEDURE TEST_SELECT:LINE/COL ERROR-------- -----------------------------5/3 PLS-00201: identifier 'DBMS_SYSTEM.OUTPUT_LINE' must be declared5/3 PL/SQL: Statement ignoredSQL> 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>
[解决办法]
dbms_output.put_line('this is my first proc in oracle !');
我的异常网推荐解决方案:oracle存储过程,http://www.myexception.cn/oracle-develop/177537.html