日期:2014-05-17 浏览次数:20978 次
CREATE OR REPLACE PROCEDURE UPDATEDEMARCATEFILEISACTIVE(NAMEX IN VARCHAR2, IDNUM IN VARCHAR2) IS BEGIN UPDATE DEMARCATEFILE SET ISACTIVE = '0' WHERE NAME = NAMEX; UPDATE DEMARCATEFILE SET ISACTIVE = '1' WHERE ID = IDNUM; END; / 调用方法: BEGIN UPDATEDEMARCATEFILEISACTIVE('abc', '123'); END; /
------解决方案--------------------
Why not commit it? try it ..
create or replace procedure UpdateDemarcateFileIsActive (IDNum in varchar2, Name_in in varchar2) as begin update demarcatefile set isactive='0' where name=Name_in; update demarcatefile set isactive='1' where id=IDNum; commit; end;
------解决方案--------------------
不知道你写这个declarations是干什么用的..
改成下面看看..
create or replace procedure UpdateDemarcateFileIsActive(IDNum in varchar2, Name in varchar2) is begin update demarcatefile set isactive = '0' where name = Name; update demarcatefile set isactive = '1' where id = IDNum; commit; end;
我的异常网推荐解决方案:oracle存储过程,http://www.aiyiweb.com/oracle-develop/177537.html