CREATE OR REPLACE PACKAGE BODY pk_sahil AS
procedure squareNumDummy(x in number,y in number) is
begin
dbms_output.put_line(x*y);
insert into sahil values('package',111);
end squareNumDummy;
function sumFun( x in number , y in number ) return number is
begin
insert into sahil values('function',222);
return x+y;
end sumFun;
END pk_sahil;
/
create or replace package pk_sahil as
procedure squareNumDummy(x in number, y in number);
function sumFun(x in number, y in number ) return number;
end pk_sahil;
/
I've made this package with a function and a procedure in it and i'm trying to call them from my java code using spring jdbctemplate. But procedure is running fine but unable to call this function.
int param1 =5 , param2 = 10;
jdbcTemplate.update( "call pk_sahil.squareNumDummy(?,?)",param1,param2);
this procedure is running fine.
jdbcTemplate.update( "call pk_sahil.sumFun(?,?)",param1,param2);
upon running this function i'm getting below error
Please correct me whether i'm not calling that function right way or i need to handle the return variable from function? How can i call that function from jdbctemplate.update(' call... ') method?