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
Define how destructors are defined in java?
what is thread in Java ?
What is hash code collision?
What is the buffer limit?
What is string and its types?
Can we declare a class as abstract without having any abstract method?
What is unmodifiable list in java?
What is the list interface in java programming?
which one is more efficient int x; 1. if(x==null) 2.if(null==x) state which one either 1 or 2?
List some important features of java 10 release?
Why stringbuilder is not thread safe in java?
What is %02d?
What’s the difference between applets and standalone program?
Difference between static synchronization vs. Instance synchronization?
What is garbage collection? Can it be forced to run?