实现存储过程必须先在oracle建立相应的Procedures,如下所示:
--添加信息-- create or replace procedure insert_t_test( p_id in number, p_name in varchar2, p_password in varchar2 ) is begin insert into t_test(id,name,password) values(p_id,p_name,p_password); end; ------------------------- --删除信息-- create or replace procedure del_t_test( p_id in number, x_out_record out number) is begin delete t_test where id = p_id; x_out_record := 0; exception when others then x_out_record := -1; end; ----------------------------- --查询所有信息-- create or replace procedure all_t_test( x_out_record out number, x_out_cursor out sys_refcursor) is begin open x_out_cursor for select * from t_test; x_out_record := 0; exception when others then x_out_record := -1; end;
?
其中的存储过程名字(就是加粗部分)必须要和java代码中的相对应