Home > DeveloperSection > Interviews > What is the advantage of using PreparedStatement?

Posted on    April-29-2011 12:33 AM

 Java Java 
Ratings:
 1 Answer(s)
  820  View(s)
Rate this:

Amit Singh

Total Post:565

Points:2825
Posted on    April-29-2011 12:00 AM

If we are using PreparedStatement the execution time will be less. The PreparedStatement object contains not just an SQL statement, but the SQL statement that has been precompiled. This means that when the PreparedStatement is executed,the RDBMS can just run the PreparedStatement’s Sql statement without having to compile it first.

Don't want to miss updates? Please click the below button!

Follow MindStick