After using this code
CallableStatement callableStatement = null;
String sqlCall = "{call my_schema.my_procedure(?,?,?,?,?,?)}";
callableStatement = connection.prepareCall(sqlCall);
when I print callableStetement to check, it suprisingly turns into
"select * from my_schema.my_procedure(?,?,?,?,?,?) as result".
But why?
When I try to run this SQL directly in DBMS, it says "ERROR: my_shema.my_procedure(integer, unknown, unknown, unknown, unknown, unknown) is a procedure Hint: To call a procedure, use CALL.";
For the first parameter I`m supposed to use registerOutParameter method.
How to run the procedure using JDBC? May be there`s something related to the database/procedure settings?
For JDBC I use 42.2.5 PostgreSQL Driver.
The version of PostgreSQL is 11.5