Answer Posted / vijayakumar chinnasamy
Batch Update provide the functionality of executing a group
of sql statement at single timing.
Steps:
1.set autocommit as false for connection .
connectionObject.setAutoCommit(false);
2.create sql statement and add to statement object.
statementObj.addBatch("sql1");
statementObj.addBatch("sql2");
statementObj.addBatch("sql3");
3.execute the batch of statement using executeBatch().
statementObj.executebatch();
4. commit the connection.
connectionObj.commit();
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is difference between overloading and overriding in java?
Differentiate between a class and an object.
What is substring 1 in java?
How to make a write-only class in java?
How to handle a web browser resize operation?
What is the multi-catch block in java?
What is immutable state?
What is the type of lambda expression?
Why is a string immutable?
What is arrays aslist in java?
Does treeset allow null in java?
What is data type in computer?
What are methods?
what is the difference between process and thread? : Java thread
What is use of arraylist in java?