What is a PreparedStatement?

Answer Posted / kalyan

If same query is executed multiple times over DB for
different values, we go for preparedStatement

PreparedStatement ps = con.prepareStatement(
"UPDATE TABLE_NAME SET COLUMN = ? WHERE COF_VALUE
LIKE ?");

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the steps required to execute a query in jdbc?

534


Where is jdbc used?

492


Explain the steps in writing a java program using jdbc?

454


What is difference between jdbc and odbc?

500


Why is odbc needed?

499






RowSetInternal caller and returns void. What can I do in the readData method?

559


What does executeupdate return in jdbc?

515


Once I have the Java 2 SDK, Standard Edition, from Sun, what else do I need to connect to a database?

546


What isolation level is used by the DBMS when inserting, updating and selecting rows from a database?

507


What do you understand by jdbc driver and explain its types?

497


Is it possible to connect to multiple databases simultaneously? Using single statement can one update or extract data from multiple databases?

528


How many types of JDBC Drivers are present and what are they?

510


What is isolation level? How to set it?

1645


What is preparedstatement in jdbc?

520


What does the jdbc resultsetmetadata interface?

557