What is PreparedStatement?

Answer Posted / mathivanan

Statement:
Where we r going to a loop the SQL query has to be
compiled every iteration.

PreparedStatement:
Unlike Statement the SQL query is compiled one time and
use that pre_compiled query in all iteration. So it reduces
the execution time
While declaring the PreparedStatement itself v can give
the query which has to performed.

Is This Answer Correct ?    23 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is DML?

577


How can we execute stored procedures?

574


Is java a database?

504


What is statement and preparedstatement in java?

495


Which is better jpa or jdbc?

507






What is jdbc template?

523


What is preparedstatement in jdbc?

520


Does jdbctemplate use prepared statements?

513


Can I get a null resultset?

552


Is it possible to connect to multiple databases simultaneously?

555


Explain the locking system in jdbc?

547


What are the 4 types of jdbc drivers?

515


Is oracle client required for jdbc connection?

502


What is ODBC and JDBC? How do you connect the Database?

539


How can you retrieve data from the resultset using jdbc?

553