请问在存储过程中如何建立日志表并且自动更新

scf_live 2017-08-04 01:24:56

create or replace procedure proc_transfer(v_incard in varchar2,
v_outcard in varchar2,
v_pass in varchar2,
v_money in varchar2,
v_result out varchar2)

is
v_inid number:=0 ;
v_outid number:=0 ;
v_inpass number:=0 ;
v_temp_money number:=0 ;
user_no_find exception;
pass_error exception;
money_no_enough exception;
begin
select count(*) into v_inid from account t where t.name =v_incard;
if v_inid =0 then
raise user_no_find;
end if;
select count(*) into v_outid from account t where t.name = v_outcard;
if v_outid =0 then
raise user_no_find;
end if;
select count(*) into v_inpass from account t where t.name =v_incard and t.pass=v_pass;
if v_inpass =0 then
raise pass_error ;
end if;
select t.money into v_temp_money from account t where t.name =v_incard;
if v_temp_money<v_money then
raise money_no_enough;
end if;

update account t set t.money =t.money+v_money where t.name =v_outcard;
update account t set t.money =t.money-v_money where t.name=v_incard;
dbms_output.put_line(0');
commit;
exception
when user_no_find then
rollback;
dbms_output.put_line('0');
commit;
when pass_error then
rollback;
dbms_output.put_line('8);
commit;
end;
...全文
181 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
卖水果的net 2017-08-04
  • 打赏
  • 举报
回复
说一下你想实现什么样的功能。
内容概要:该文档为一段用于Google Earth Engine(GEE)平台的JavaScript代码脚本,旨在对研究区域(AOI)内的Landsat 8卫星影像进行土地利用/土地覆盖(LULC)分类。脚本首先筛选2024年云量低于10%的Landsat 8 Level-2地反射率影像,构建值合成影像并应用缩放因子校正。随后,基于预先定义的水体(Water)和植被(Vegetation)样本点,合并训练样本并提取影像对应波段数据,采用随机森林分类器(smileRandomForest)对影像进行监督分类。最后,通过划分训练集与测试集,输出混淆矩阵、总体分类精度和Kappa系数,完成分类结果的精度评估。; 适合人群:具备遥感图像处理基础知识的科研人员、地理信息系统(GIS)技术人员以及环境监测相关领域的研究生或专业人员;熟悉GEE平台基本操作者更佳; 使用场景及目标:①实现特定区域多光谱遥感影像的土地覆盖分类;②掌握GEE平台上从影像预处理、样本构建、模型训练到精度验证的完整分类流程;③支持水资源管理、生态环境监测等应用领域的空间数据分析; 阅读建议:此资源以实际代码形式呈现,建议结合GEE开发环境边运行边学习,重点关注影像预处理方法、训练样本构建逻辑、分类器参数设置及精度评估指标解读,便于迁移应用于其他区域或传感器数据。

17,137

社区成员

发帖
与我相关
我的任务
社区描述
Oracle开发相关技术讨论
社区管理员
  • 开发
  • Lucifer三思而后行
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧