This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
When u want to exceute the same query in loop then the best one to use is PreparedStatement as it will be precompiled. I would like you to go through this thread to have better clarificationPrepearedStatement Vs Statement
Originally posted by Aniruddha Mukhopadhyay: When you need to compile a SQL stored procedure, Statement would be used.
Its unlikely you would compile a Stored Procedure from Java code, this will probably be done when the procedure is created. If you need to call a Stored Procedure from Java, you would use a CallableStatement. [ September 28, 2005: Message edited by: Paul Sturrock ]