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 do you understand by synchronization?
How is java hashmap implemented?
I don’t want my class to be inherited by any other class. What should I do?
How is a structure different from array ?
What is the final method?
Which package is always imported by default?
What is finalize()? Is finalize() similar to a destructor?
Can a static method be final?
What is scope & storage allocation of global and extern variables? Explain with an example
What is difference between path and classpath in java?
Is 64bit faster than 32 bit?
What do you understand by access specifiers in Java?
explain different ways of using thread? : Java thread
Difference between operator overloading and function overloading
What does super keyword do?