Thursday, 6 September 2012

What statements are correct about batched insert and updates? (2 answers) | Java JDBC

A. To create a batch of insert and update statements, you create an object of type Batch, and call the method addStatement(String statement) for each statement you want to execute in the batch
B. Batch insert and updates are only possible when making use of parameterized queries.
C. To do a batched update/insert, you call addBatch(String statement) on a Statement object for each statement you want to execute in the batch
D. To execute a batched update/insert, you call the executeBatch() method on a Statement object

Ans:   C,D

No comments: