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
why using interface interface ?
Is ++ operator is thread safe in java?
What is the purpose of the finally clause of a try-catch-finally statement in java programming?
Can we define a package statement after the import statement in java?
What is difference between == and === in js?
Why set do not allow duplicates in java?
What is the point of java?
What is the locale class in java programming?
Explain the importance of throws keyword in java?
How can I become a good programmer?
Write a program in java to create a doubly linked list containing n nodes.
What is void class in java?
What is a functional interface?
Can we declare a class as static?
Implementations of set interface?