DELETE in batch
Statement st = con.createStatement();
st.addBatch("DELETE FROM tbl1");
st.addBatch("DELETE FROM tbl2");
int[] results = st.executeBatch();INSERT in batch
PreparedStatement ps = con.prepareStatement(
"INSERT INTO DBUSER(USER_ID, USERNAME) VALUES(?, ?)"
);
ps.setInt(1, 101);
ps.setString(2, "mkyong101");
ps.addBatch();
ps.executeBatch();In JDBC puoi eseguire più comandi con addBatch() e executeBatch().