show err[ors]查看错误原因new_sal = current_sal - in_sal;
=>
new_sal := current_sal - in_sal;

解决方案 »

  1.   

    关于赋值,已改正。但还是给出“警告: 创建的过程带有编译错误。”信息。麻烦的是它不给出错误在哪。我试了试,把整个过程体拿掉:
    create procedure sam_first_pro (in_playerid string, in_sal real) is
      current_sal real;
      new_sal real;
      salary_missing EXCEPTION;
    begin
    end sam_first_pro;
    它照样给出“警告: 创建的过程带有编译错误。”信息。请高手诊断。
      

  2.   

    show error
    看错误在哪行
      

  3.   

    怎么用show error?  紧接着我上面写的过程后面用吗?好象不行啊。
      

  4.   

    而且能解释一下为什么空壳的存储过程它仍说有编译错呢?比如下面这个:
    create procedure sam_first_pro (in_playerid string, in_sal real) is
    begin
    end sam_first_pro;
      

  5.   

    至少要有个语句,如:
    create procedure sam_first_pro (in_playerid string, in_sal real) is
    begin
    null;
    end sam_first_pro;
      

  6.   

    create procedure sam_first_pro (in_playerid string, in_sal real) is
    begin
    null;
    end sam_first_pro;
    仍然是:警告: 创建的过程带有编译错误。
      

  7.   

    SQL> create procedure sam_first_pro (in_playerid string, in_sal real) is
      2  begin
      3  null;
      4  end sam_first_pro;
      5  
      6  /过程已创建。我怎么没有啊??我是粘贴你的代码啊~
      

  8.   

    我在8.17上试过没什么问题,你把传入变量改成in_playerid varchar2, in_sal number
    看看
      

  9.   

    我又试了试,把传入参数统统去掉,如下例,仍然得到:警告: 创建的过程带有编译错误。
    create procedure sam_first_pro () is
    begin
    null;
    end sam_first_pro;
    但存储过程究竟建没建起呢?因为我每次重新create前必须得用:drop procedure sam_first_pro;把它先删掉才能又建。疑问重重啊!
      

  10.   

    你可以create or replace procedure ...
    建没建起来,desc 过程名,看看就知道了
      

  11.   

    我用desc sam_first_pro;试了试,不行,”ORA-24372: 无效的描述对象“,说明前面的存储过程没建好。什么原因呢?我的系统吗?
      

  12.   

    create procedure sam_first_pro () is
    begin
    null;
    end sam_first_pro;show err
    即可查看错误信息每次重新create前必须得用:drop procedure 改成create or replace procedure ...
      

  13.   

    已经创建了,只不过是有错误的,改成如下:
    create or replace procedure sam_first_pro is
    begin
    null;
    end sam_first_pro;
    没有括号的
      

  14.   

    execute 过程名(参数,如果有的话);

    begin
    过程名;
    end;
    /
      

  15.   

    网上下一个叫pl/sql developer的工具,能帮你尽快的找出错误,并能单步调试,及方便你查看所写的procedure