InterviewSolution
Saved Bookmarks
| 1. |
What is a Stored Procedure and how do you call it in JDBC? |
|
Answer» A stored procedure is a group of SQL statements that form a logical unit and perform a particular task. For example operations on an employee database (hire, fire, promote, lookup) could be coded as stored procedures executed by application code. Stored procedures can be called using CallableStatement class in JDBC API. For example the following code demonstrates this CallableStatement cs = con.prepareCall("{call MY_SAMPLE_STORED_PROC}");ResultSet rs = cs.executeQuery();
|
|