CallableStatement vs Statement

When calling a stored procedure with no arguments and no output, is there any advantage to using CallableStatement over a regular Statement or PreparedStatement ?

+5
source share
1 answer

CallableStatement allows you to use the general JDBC syntax for call procedures, rather than database specific.

Unfortunately, we did not do this for Oracle in one of the projects that I worked on, so all of our procedure calls look something like this:

 String query = "begin package.sp_Procedure(?, ?); end;"; 
+5
source

Source: https://habr.com/ru/post/903018/


All Articles