Commit
The syntax for the ROLLBACK statement is:
There are three transaction control functions. These are:
The syntax for a Lock table is:
Lock_mode is one of:
The syntax for the COMMIT statement is:
COMMIT [WORK] [COMMENT text];
The Commit statement commits all changes for the current session. Once a commit is issued, other users will be able to see your changes.
Rollback
ROLLBACK [WORK] [TO [SAVEPOINT] savepoint_name];The Rollback statement undoes all changes for the current session up to the savepoint specified. If no savepoint is specified, then all changes are undone.
Set Transaction
- SET TRANSACTION READ ONLY;
- SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
- SET TRANSACTION USE ROLLBACK SEGMENT name;
Lock Table
LOCK TABLE tables IN lock_mode MODE [NOWAIT];Tables is a comma-delimited list of tables.
Lock_mode is one of:
- ROW SHARE
- ROW EXCLUSIVE
- SHARE UPDATE
- SHARE
- SHARE ROW EXCLUSIVE
- EXCLUSIVE