|
Answer» Typical sequences of steps to use Batch Processing with Statement or PrepareStatement Object are In case of Batch processing using PrepareStatement object, create SQL statements with placeholders. Create a Statement or PrepareStatement object using either createStatement() or prepareStatement() methods respectively. Set auto-commit to false using setAutoCommit(). Add as many as SQL statements you like into batch using addBatch() method on created statement object. Execute all the SQL statements using executeBatch() method on created statement object. Finally, commit all the changes using commit() method.
|