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 happens if we override private method?
Can the garbage collection be forced by any means?
Break statement can be used as labels in java?
What is static import?
What are decalarations?
If a method is declared as protected, where may the method be accessed?
What are the 2 types of java programs?
What is the instance of an object?
Write a code to create a trigger to call a stored procedure
Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?
From the two, which would be easier to write: synchronization code for ten threads or two threads?
Using callable statement how can you pass out parameters, explain with example?
What is the difference between size and length in java?
Why does java have two ways to create child threads? Which way is better?
Name few "optional" classes introduced with java 8 ?