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 ]