What is callablestatement? How you can call stored procedure to pass in parameter?



What is callablestatement? How you can call stored procedure to pass in parameter?..

Answer / Gulwaiz Akhter

A CallableStatement is a type of Statement interface that represents a prepared SQL statement that may contain input parameters and may return a single value, an array, or a ResultSet object. To call a stored procedure with parameters, you create a CallableStatement, set the parameter values using the setXXX methods (where XXX corresponds to the JDBC data type), and then execute the statement using the execute() method. You can retrieve the results using getXXX methods.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

give me the answer of this code class A extnds String This code we can write r not in Java? Explain?

4 Answers  


Differentiate between == and equals().

1 Answers  


What is the difference between multitasking and multithreading in Java

1 Answers   Sans Pareil IT Services,


How do you sort a list in java?

1 Answers  


How do you use compareto method?

1 Answers  


Why main function is static?

1 Answers   MCN Solutions,


What does string [] args mean?

1 Answers  


What is the difference between private & public & friendly classes?

1 Answers  


How to implement Singleton

6 Answers   DELL,


What is main method?

1 Answers  


How do you start a new line in java?

1 Answers  


How do you access command-line arguments within the code?

1 Answers   Flextronics, Hexaware,


Categories