How to execute bulk number of queries at once?

Answer Posted / kalyan

we can update multiple statements using batch as follows

statemenent st = getconnection().getStatement();
st.addBatch(sql stat1);
st.addBatch(sql stat2) ;

....

st.executeBatch();

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a datasource in java?

502


What is jdbc in dbms?

498


Give steps to connect to the db using jdbc?

586


What is savepoint in jdbc?

511


What is a jdbc connection?

470






What is a rollback in jdbc?

520


Briefly tell about the jdbc architecture.

551


How many ways can you update a result set?

559


Why do we use jdbc in java?

544


How can we disable a constraint ?

563


How to connect html page to database using jdbc?

490


Which database is used for java?

526


How can I write to the log used by DriverManager and JDBC drivers?

517


What is difference between jdbc and odbc?

493


What is the different between ResultSet and RowSet?

541