Use addBatch(), clearBatch() and executeBatch() methods of the Statement interface.
Separate INSERT statements with semicolon and execute it as a single Statement.
Implement execute() method of the Transaction interface
Disable autocommit, execute queries and commit the transaction explicitly.
In JDBC each statement is executed within its own transaction.
|