急求!怎么建立oracle存储过程(实例)

2020-07-17 社会 120阅读
create or replace PROCEDURE st_receipt(p_sheetid varchar2(16))
AS
BEGIN
insert into receipt select * from receipt0 where sheetid=p_sheetid ; --将 receipt0表中数据插入 receipt
update receipt set Flag=100 wheresheetid=p_sheetid; --更新receipt表中Flag值
insert into ReceiptItem select * from ReceiptItem0 where sheetid=p_sheetid ;
delete from ReceiptItem0 where sheetid=p_sheetid ;--删除ReceiptItem0表数据
delete from receipt0 where sheetid=p_sheetid ; --删除 receipt0表数据
end ;
exec st_receipt('ys141128')
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com