10.4 Commits and Rollbacks |
In the JDBC the default behavior is set to auto-commit. This means that as each SQL command is executed it is automatically committed. Auto-commit can be turned off by calling the setAutoCommit() method on the Connection object.
Once the auto-commit mode commit mode has been turned off the commit() and rollback() methods on the Connection object can be used to commit or rollback changes to the database.