收藏 请教如何把日期参数传给oracle的存储过程 [复制链接]
oracle存储过程中日期时间参数的传入 (2013-09-16 14:42:16)转载▼
oracle存储过程传入日期时间参数
存储过程的定义:create or replace procedure P_SUMMARY_BRANCH (i_branchID in int ,i_energyItemId in int, i_date in date)
plsql中的调用:call P_SUMMARY_BRANCH(1169,2,to_date('2013-09-16 14:22:20','yyyy-mm-dd hh24:mi:ss'))
ps:无参数的存储过程调用时要有括号,如:call P_COPYVALUE()
create or replace procedure charu_lsjl
(
wdid in varchar2,
xxxh in varchar2,
ygxh in varchar2,
wdmj in varchar2,
bmqx in date --这个字段在数据库中就是日期类型的
)is
v_exe_query varchar(1000);
begin
v_exe_query:= 'insert into osis_fwcl_b_lsjl (wdid,xxxh,ygxh,wdmj,bmqx) values (:v1,:v2,:v3,:v4,:v5)';
execute immediate v_exe_query USING wdid,xxxh,ygxh,wdmj,bmqx;
commit;
end charu_lsjl
来源:https://www.cnblogs.com/nuaaydh/p/4313425.html