java - Is "prepared-statement" a stored procedure? -


is "prepared-statement" stored procedure? link appears not be. comparison prepared statements link appears be. jdbc introduction

(ctrl+f stored procedure find bit related stored procedure in second link)

in latter link code example show in official oracle web page, prepared statement, not callable statement thought correspond stored procedure.

you right, code referenced in tutorial not call stored procedure. intention convey is stored procedure written in java:

the latest generation of database products allows stored procedures written using java programming language , jdbc api.

the following code example of how create simple stored procedure using java programming language. note stored procedure static java method contains normal jdbc code. accepts 2 input parameters , uses them change employee's car number.

(emphasis mine)

for example oracle supports java stored procedures, example in tutorial how implement stored procedure using java. in opinion highly confusing because not how call stored procedure java, , should not have been part of jdbc tutorial in form.

to clear: preparedstatement not stored procedure, can used call (execute) stored procedure (the same applies statement), callablestatement has more features suitable executing stored procedures.

in tutorial java stored procedure uses preparedstatement execute query part of execution of java stored procedure. unfortunate tutorial clouds issue discussing advanced subject without talking normal task of executing stored procedures.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -