• Post Reply Bookmark Topic Watch Topic
  • New Topic

Prepared Statement vs statement  RSS feed

 
satishbsk kumar
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How Prepared statement differ statement ,while passing different values in where condition
Regards,
Satish
 
Jan Cumps
Bartender
Posts: 2628
17
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A database can recognize that a PreparedStatement with different values is the same query, and does not have to recompile / buikd execution plan.

A database will consider a Statement with different values as a different query, and will recompile it, and re-determine the execution plan.

(hope I did not make your homework)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!