aspose file tools*
The moose likes JDBC and the fly likes Statement Vs PreparedStatement ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Statement Vs PreparedStatement ?" Watch "Statement Vs PreparedStatement ?" New topic

Statement Vs PreparedStatement ?

Seshaiah Chimata

Joined: Aug 02, 2012
Posts: 5

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 ?

Wendy Gibbons

Joined: Oct 21, 2008
Posts: 1106

can you do DDL in prepared statements eg create table?
I agree. Here's the link:
subject: Statement Vs PreparedStatement ?
Similar Threads
PreparedStatement Vs Statement
Statement & PreparedStatement
how to execute complex queries
Statement vs PreparedStatement
why java.sql package contain most interface like Statement,preparedStatement ?