database - Use begin..end or call to call stored procedures -
when call stored procedure in oracle database jdbc have following alternatives. 1 recommended used , why?
preparecall("{call my_fun}");
preparecall"{begin my_fun; end;}");
thanks reply.
regards johannes
it depends. using begin..end
, call anonymous pl/sql program block, in turn calls stored procedure. when use call
, call procedure sql. call has additional benefit of having possibility return values , more. see oracle database sql language reference: call more information.
that said, if call procedure this, there's not of difference. think theoretically begin..end
more efficient, since procedure pl/sql , call
, being sql, cause context switch between sql , pl/sql has overhead. don't think notice diffence if exists.
Comments
Post a Comment