这个(Oracle)存储过程错在那?很简单,各位大虾看一下,一定给分!!谢谢啦!!!!!
SQL> create or replace procedure upd_ord_detail
2 (p_order_no varchar2(20),
3 p_item_code varchar2(10),
4 p_item_qty numeric(10))
5 as
6 update ord_order_detail2
7 set item_qty = item_qty + p_item_qty
8 where order_no = p_order_no
9 and item_code = p_item_code;
10 if sql%rowcount = 0 then --no record updated
11 insert into ord_order_detail2 (order_no,item_code,item_qty)
12 values (p_order_no, p_item_code, p_item_qty);
13 end if;
14 end upd_ord_detail;
15 /
警告: 创建的过程带有编译错误。
SQL> show error;
PROCEDURE UPD_ORD_DETAIL 出现错误:
LINE/COL ERROR
-------- -----------------------------------------------------------------
2/26 PLS-00103: 出现符号 "("在需要下列之一时:
:=.),@%defaultcharacter
符号 ":=" 被替换为 "(" 后继续。
3/24 PLS-00103: 出现符号 "("在需要下列之一时:
:=.),@%defaultcharacter
符号 ":=" 被替换为 "(" 后继续。
4/24 PLS-00103: 出现符号 "("在需要下列之一时:
:=.),@%defaultcharacter
符号 ":=" 被替换为 "(" 后继续。
LINE/COL ERROR
-------- -----------------------------------------------------------------
6/3 PLS-00103: 出现符号 "UPDATE"在需要下列之一时:
beginfunctionpackage
pragmaproceduresubtypetypeuse<an identifier>
<a double-quoted delimited-identifier>cursorformcurrent
externallanguage
符号 "begin" 被替换为 "UPDATE" 后继续。