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?

  1. preparecall("{call my_fun}");

  2. 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

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -