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 jdbc thin client in oracle?

665


What driver should I use for scalable Oracle JDBC applications?

723


Can I get a null resultset?

734


Does jpa use jdbc?

686


Does jdbctemplate use prepared statements?

688


Why is jdbc needed?

685


What is the most common example type 1 driver?

786


What are the advantages of using preparedstatement over statement?

760


What is jdbc and odbc in java?

689


How java can be connected to a database?

787


Explain about multiple implementations and drive manager?

790


What are the advantages of using preparedstatement in java?

742


java based application for hospital management

3618


Result set’s index starts with 0 or 1?

753


What is jdbc vs odbc?

713