Oracle® TimesTen In-Memory Database SQL Reference Release 11.2.1 Part Number E13070-03 |
|
|
View PDF |
The COMMIT statement ends the current transaction and makes permanent all changes performed in the transaction. A transaction is a sequence of SQL statements treated as a single unit.
Required privilege
None
SQL syntax
COMMIT [WORK]
Parameters
The COMMIT statement allows the optional keyword:
Parameter | Description |
---|---|
[WORK] |
Optional clause supported for compliance with the SQL standard. COMMIT and COMMIT WORK are equivalent. |
Description
Until you commit a transaction:
You can see any changes you have made during the transaction but other users cannot see the changes. After you commit the transaction, the changes are visible to other users' statements that execute after the commit.
You can roll back (undo) changes made during the transaction with the ROLLBACK statement.
This statement releases transaction locks.
For passthrough, the Oracle transaction will also be committed.
A commit closes all open cursors.
Examples
Insert row into regions
table of HR schema and commit transaction. First set autocommit to 0:
Command> SET AUTOCOMMIT 0; Command> INSERT INTO regions VALUES (5,'Australia'); 1 row inserted. Command> COMMIT; Command> SELECT * FROM regions; < 1, Europe > < 2, Americas > < 3, Asia > < 4, Middle East and Africa > < 5, Australia > 5 rows found.
See also