How transactions will behave; If I use following syntax to execute multiple DML using single java.sql.Statement
String sqlStr = "INSERT INTO.... \n update t1 set....";
statemet.execute(sqlStr);
I am not altering default connection setting (autocommit = true).
I am aware this is not the right way / best practice; just curious to know the transactional nature of above code That is if update fails with SQLException, will insert rollback?