This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Statement Vs PreparedStatement ?" Watch "Statement Vs PreparedStatement ?" New topic
Author

Statement Vs PreparedStatement ?

Seshaiah Chimata
Greenhorn

Joined: Aug 02, 2012
Posts: 5
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

Joined: Oct 21, 2008
Posts: 1107

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