Answer Posted / rama krishna dwadasi
By using CallableStatement we can call a stored Procedure
from JDBC
CallableStatement:- is an interface available in java.sql
package and is extending PreparedStatement interface.
•It is used to execute stored procedures available in the
database.
•Following is the way to create the CallableStatement object.
a)CallableStatement cs = con.prepareCall(sql);
b)CallableStatement cs = con.prepareCall(sql,int,int);
•One CallableStatement object can be used to invoke one
stored procedure only.
•CallableStatement also provides placeholder mechanism
•Following is the way to invoke the stored procedure.
CallableStatement cs = con.prepareCall(“{call p1 (?,?)}”);
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What are the two types of java?
Can java arraylist hold different types?
What is a void in java?
What is java util?
What is the synonym of string?
Which way a developer should use for creating thread, i.e. Sub classing thread or implementing runnable.
Is java written in c?
what is the difference between process and thread? : Java thread
Can a function return a function?
How would overload a function based on return type?
Which is faster set or list in java?
What is a constructor overloading in java?
Name few java.lang classes introduced with java 8 ?
Explain about interrupt() method of thread class ?
What are the different conditional statements?