想学习下存储过程,求资料
想系统的学习下存储过程,不知道各位大虾有没有好的资料,书籍、视频等等,非常感谢!kkc-7@163.com 存储过程?数据库 存储过程 数据库
[解决办法]
个人感觉看资料很烦,而且用处不大,给你个例子你看看,再自己动手写几个,遇到具体的问题是再在网上搜答案。
CREATE OR REPLACE
PROCEDURE p_bctts_enterext_update
(var_id in number,
var_old_address varchar2,
var_new_address varchar2,
var_coperation varchar2,
var_bj_manager varchar2,
var_phone varchar2,
var_email varchar2,
var_consigner varchar2,
var_deputy varchar2,
var_accredit_content varchar2,
var_deputy_start_date date,
var_deputy_end_date date)
IS
var_errormsg varchar2(4000);
var_zyxt_enterprise_id varchar2(16);
BEGIN
var_errormsg := '';
var_zyxt_enterprise_id := '';
select zyxt_enterprise_id
into var_zyxt_enterprise_id
from t_enterprise_info
where id = var_id;
update bctts.t_enterprise_info
set bctts.t_enterprise_info.old_address = var_old_address,
bctts.t_enterprise_info.new_address = var_new_address,
bctts.t_enterprise_info.coperation = var_coperation,
bctts.t_enterprise_info.bj_manager = var_bj_manager,
bctts.t_enterprise_info.phone = var_phone,
bctts.t_enterprise_info.email = var_email,
bctts.t_enterprise_info.consigner = var_consigner,
bctts.t_enterprise_info.deputy = var_deputy,
bctts.t_enterprise_info.accredit_content = var_accredit_content,
bctts.t_enterprise_info.deputy_start_date = var_deputy_start_date,
bctts.t_enterprise_info.deputy_end_date = var_deputy_end_date
where enterprise_id = var_zyxt_enterprise_id;
COMMIT;
EXCEPTION
when others then
var_errormsg := SUBSTR(SQLERRM, 1, 4000);
INSERT INTO t_zyjcxxsync_error_info
(f_tablename,
t_tablename,
op_type,
primary_value,
errormsg,
operate_date,
remark)
VALUES
('bcpbs.t_enterpriseextend_info',
'bctts.t_enterprise_info',
'update',
var_id,
var_errormsg,
sysdate(),
'p_bctts_enterext_update');
ROLLBACK;
RETURN;
end;
[解决办法]
有个建议,其实你百度一下会有很多好的资料,很多博客都写的不错,
比如说:
http://www.cnblogs.com/kkcheng/archive/2010/03/19/1689672.html
在比如 http://www.cnblogs.com/chinafine/articles/1776094.html
为什么不去百度呢??
[解决办法]
推荐韩顺平的玩转oracle,下面是下载的网址,我就是看这学习oracle 的
http://xidong.net/File001/File_59009.html
[解决办法]
baidu一下很多的。
