Can anyone please explain the difference between Callable and Prepared Statement in Sql with any example?
Asked
Active
Viewed 3,897 times
3
-
1Callable statement is used for executing Stored Procedures, not queries. – Nico Van Belle Jun 16 '17 at 11:31
-
3Look into this [answer](https://stackoverflow.com/questions/8371053/jdbc-statement-preparedstatement-callablestatement-and-caching/46975031#46975031) to get a detailed view of the Interfaces. – Oct 27 '17 at 12:49
1 Answers
2
At the top level you can go by this thought Prepared Statement
Instances of PreparedStatement contain an SQL statement that has already been compiled. This is what makes a statement "prepared"
Because PreparedStatement objects are precompiled, their execution can be faster than that of Statement objects.
The prepared statement is used to execute sql queries Callable Statement
A CallableStatement object provides a way to call stored procedures in a standard way for all RDBMSs. A stored procedure is stored in a database; the call to the stored procedure is what a CallableStatement object contains.

S V
- 115
- 6