JAVA JDBC Programming Question:

Download Job Interview Questions and Answers PDF

How to call a Stored Procedure from JDBC?

JDBC Interview Question
JDBC Interview Question

Answer:

The first step is to create a CallableStatement object. As with Statement an and PreparedStatement objects, this is done with an open Connection object. A CallableStatement object contains a call to a stored procedure;

E.g.
CallableStatement cs = con.prepareCall(”{call SHOW_SUPPLIERS}”);
ResultSet rs = cs.executeQuery();

Download JDBC Interview Questions And Answers PDF

Previous QuestionNext Question
How can you use PreparedStatement in JDBC?How to Retrieve Warnings in JDBC?