Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Statement Vs PreparedStatement ?

 
Seshaiah Chimata
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Why do we need Statement when there is a more benefit with PreparedStatement (Pre-compiled in database after first hit)?
I mean in which scenario we should use Statement interface instead of PreparedStatement interface ?

Thanks,
Seshu
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you do DDL in prepared statements eg create table?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic