I am doing an operation to first delete a record then insert in to the same table like this:
String delete = "DELETE FROM t WHERE t.id = id"
String insert = "INSERT INTO t VALUES (id, value1, value2)"
Statement s = conn.createStatement();
s.executeUpdate(delete);
s = conn.createStatement();
s.executeUpdate(insert);
then my application just blocked there after executing the insert statement. no response at all.
does any one know whats going on?
the db is oracle 11g.
I found the reason. the AUTOCOMMIT flag is set to OFF.