Table of Contents

About

Transaction - Commit in SQL.

In a SQL, a commit can be:

Syntax

COMMIT;

or Ansi Standard SQL:

COMMIT WORK;

Type

Explicit

An explicit commit occurs when the COMMIT statement is executed.

Implicit

An implicit commit occurs automatically when certain database events occur.

The database issues an implicit COMMIT statement before and after every DDL statement. If the current transaction contains DML statements, then Oracle Database first commits the transaction and then runs and commits the DDL statement as a new, single-statement transaction.

A user exits normally from most Oracle Database utilities and tools, causing the current transaction to be implicitly committed. The commit behavior when a user disconnects is application-dependent and configurable.

Automatic

By default, normally a database connection is in auto-commit mode, which means that it automatically commits changes after executing each statement

See Java connection doc

Performance

Typically, a commit is a fast operation, regardless of the transaction size. The speed of a commit does not increase with the size of the data modified in the transaction.

See Transactions - Write-Ahead Logging (Rollback journal) - WAL