batch preparedstatement with different sql queries
I found existing questions similar to this one that did not actually have a clear answer to the question. A normal batch preparedstatement with one sql query would look something like this: private static void batchInsertRecordsIntoTable() throws SQLException { Connection dbConnection = null; PreparedStatement preparedStatement = null; String insertTableSQL = "INSERT INTO DBUSER" + "(USER_ID, USERNAME, CREATED_BY, CREATED_DATE) VALUES" + "(?,?,?,?)"; try { dbConnection = getDBConnection(); preparedStatement = dbConnection.prepareStatement(insertTableSQL); dbConnection.setAutoCommit(false);