JDBC%20Interview%20Questions%20and%20Answers
Question: How do you call a stored procedure from JDBC?Answer: The first step is to create a CallableStatement object. As with Statement an and PreparedStatement objects, this is done with an openConnection object. A CallableStatement object contains a call to a stored procedure. CallableStatement cs = con.prepareCall("{call SHOW_EMPLOYEES}"); ResultSet rs = cs.executeQuery(); |
Is it helpful?
Yes
No
Most helpful rated by users:
- What is JDBC? Describe the steps needed to execute a SQL query using JDBC.
- What are the steps involved in establishing a JDBC connection?
- Is JDBC-ODBC bridge multi-threaded?
- Does the JDBC-ODBC Bridge support multiple concurrent open statements per connection?
- What are the different driver types available in JDBC?