How do we call stored procedure using JDBC?- As with Statement objects, to call the stored procedure, you can call execute, executeQuery, or executeUpdate depending on how many ResultSet objects the procedure returns. - However, if you are not sure how many ResultSet objects the procedure returns, call execute. - The interface CallableStatement extends PreparedStatement. It is used to call stored procedures. - Specify values for IN parameters just like you would with a PreparedStatement object by calling the appropriate setter method. - However, if a stored procedure contains an OUT parameter, you must register it with the registerOutParameter method.
|