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

How to insert an image or raw data into database?

552


What is the function of drivermanager class?

551


How do we call a stored procedure from jdbc?

555


What is the JDBC?

557


What are the exceptions in jdbc?

500






What is thin driver in jdbc?

508


Why can't I invoke the ResultSet methods afterLast and beforeFirst when the method next works?

659


java based application for hospital management

3445


What are types of resultset?

556


What is jdbc and odbc?

503


What are common JDBC Exceptions?

546


What class.forname does, while loading the drivers?

535


What is the use of callablestatement? Name the method, which is used to prepare a callablestatement.

475


What is the purpose of jdbc?

581


How do you determine the sensitivity of the ResultSet object?

544