What is Statement and PreparedStatement? whatz the
difference?

Answer Posted / harish

When you execute a SQL query with Statement. It parses and
executes in the database each time. Where as in
PreparedStatement, first time it parses and executes and
subsequent times, it directly substitute the values in the
query and executes. It is faster than Statement

Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why can't Tomcat find my Oracle JDBC drivers in classes111.zip?

726


What is meant by dao?

695


Prepared statements are faster. Why?

760


What is layer in communication?

623


What is the reason why we need a jdbcrowset like the wrapper around resultset?

712






What is jdbc resultsetmetadata interface?

697


What is batch processing and how to perform batch processing in jdbc?

672


What is jdbc and its types?

655


What are the standard isolation levels defined by JDBC?

722


How to check jdbc connection in linux?

675


How to rollback a JDBC transaction?

744


Why do we need jdbc api?

658


What are the differences between setmaxrows(int) and setfetchsize(int)?

757


What is jdbc and jpa?

682


What is db client?

684