oracle存储过程
发布时间:2020-12-12 14:36:53 所属栏目:百科 来源:网络整理
导读:一。存储过程的优点 1.执行速度更快 – 在数据库中保存的存储过程语句都是编译过的 2.允许模块化程序设计 – 类似方法的复用 3.提高系统安全性 – 防止SQL注入 4.减少网络流通量 – 只要传输存储过程的名称 二。创建存储过程的语句 create or replace proced
一。存储过程的优点 1.执行速度更快 – 在数据库中保存的存储过程语句都是编译过的 二。创建存储过程的语句 create or replace procedure Uppow(r_id varchar2,p_id varchar2,p_state number) asnum varchar2(100); begin select count(*) into num from sst_role_perm where ROLEID =r_id and permid =p_id ; if(num>0) then update sst_role_perm set state=p_state where ROLEID =r_id and permid =p_id; else insert into sst_role_perm values(sys_guid(),r_id,p_id,p_state); end if; commit; end; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |