This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
    Bookmark Topic Watch Topic
  • New Topic

Prepared Vs Callable statements

 
vishnu mohan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Report post to moderator
hi,
what is the difference between prepared statement and the callable statements ?
Thanks and regards
Vishnu
 
Snigdha Solanki
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Report post to moderator
Prepared Statement is used to execute SQL query whereas Callbale Statement is used to execute Stored Procedures.
 
Alex Sanchez
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Report post to moderator
That's right, and a stored procedure is , as written in the MySQL manual:
A stored procedure is a set of SQL commands that can be compiled and stored in the server. Once this has been done, clients don't need to keep re-issuing the entire query but can refer to the stored procedure. This provides better performance because the query has to be parsed only once, and less information needs to be sent between the server and the client. You can also raise the conceptual level by having libraries of functions in the server.
 
angela irfani
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi all!

What if I use Callable statements to execute SQL query, is it okay?
Is prepared statement better than callable statements to execute SQL query?

Thanks for the info..
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi Angela,

Welcome to JavaRanch!

Can you create a new thread. This one is from 2002.
Please also do a search in the JDBC forum. We have had several posts on the same subject this week.

Regards, Jan

 
    Bookmark Topic Watch Topic
  • New Topic