Suppose a program needs to execute many
INSERT statements to populate a database table. You can improve the performance of the program by using a batch update. In a batch update, a sequence of statements is collected and submitted as a batch.
supportsBatchUpdates method of the
DatabaseMetaData interface to find out if your database supports this feature.
The statements in a batch can be actions such as
DELETE as well as data definition statements such as
CREATE TABLE or
DROP TABLE. An exception is thrown if you add a
SELECT statement to a batch. (Conceptually, a
SELECT statement makes no ...