INSERT
, UPDATE
, DELETE
) are committed automatically as soon as they are executed.
This is known as auto-commit mode.
You can, however, disable auto-commit mode with the following method call on the Connection
object:
conn.setAutoCommit(false);If you disable auto-commit mode, then you must manually commit or roll back changes with the appropriate method call on the
Connection
object:
conn.commit( );or conn.rollback( ); |
COMMIT
or ROLLBACK
operation affects all DML statements executed since the last COMMIT
or ROLLBACK
.COMMIT
operation is executed.
CREATE
or ALTER
, always includes an implicit COMMIT
.
If auto-commit mode is disabled, this implicit COMMIT
will not only commit the DDL statement, but also any pending DML operations that had not yet been explicitly committed or rolled back.
I entered 10 puns in a pun contest hoping one would win, but no pun in ten did. |