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 what is better 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 "what is better" Watch "what is better" New topic

what is better

Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
is prepared statement or callable statement better?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60773

For what?

That's like asking: what's better? a spoon or a fork?

And please be more descriptive in your topic titles.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Agador Paloi
Ranch Hand

Joined: Jan 24, 2006
Posts: 118
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30076

Samanthi perera wrote:is prepared statement or callable statement better?

They don't do the same thing. If you have a stored proecedure, you'd use a callable statement. Otherwise you wouldn't.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 37950
It would be better to read this than to ask what is better.
It is sorta covered in the JavaRanch Style Guide.
subject: what is better
Similar Threads
When should use Statement over PreparedStatement
statement Vs prepared statement for ordinary select queries
Escape Character Help
String Vs Stringbuffer