What is the use of prepared statement?Ans:used to execute
pre compiled statement...so the question is when that
precompiled statement will be execute or
comiple?................

Answer Posted / nagashree

Prepared statements are used due to its 2 advantages.

Advantages:
1) We can give dynamic values.
2) The statement will be compiled only once, it need not be
compiled each & every time we give new values.

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does the database server have to be running Java or have Java support in order for my remote JDBC client app to access the database?

499


How can we retrieve data from the resultset?

529


What is a datasource in java?

488


What is a jdbctemplate?

502


How to insert and delete a row programmatically? (new feature in JDBC 2.0)

510






What are different types of JDBC Drivers?

513


Differentiate between a statement and a preparedstatement.

477


How can we execute stored procedures using callablestatement?

448


Where jdbc drivermanager class is used?

507


Why would you use setautocommit(false) in jdbc?

633


Explain the role of driver in jdbc.

537


What are the differences between statement and preparedstatement interface?

499


Why should we close database connections in java?

668


Explain Basic Steps in Writing a Java Program Using Jdbc?

580


What are 4 drivers available in JDBC? At what situation are four of the drivers used?

514