Oracle PL/SQL: Commit Transactions

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.

Oracle PL/SQL: Rollback Transactions

The syntax for the ROLLBACK statement is:

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.

Oracle PL/SQL: SET Transactions

There are three transaction control functions. These are:

  1. SET TRANSACTION READ ONLY;
  2. SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
  3. SET TRANSACTION USE ROLLBACK SEGMENT name;

Oracle PL/SQL: Lock Table

The syntax for a Lock table is:

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.

NoWait specifies that the database should not wait for a lock to be released.

Related Posts

  1. Transactions in SQL- Server 2008
  2. Oracle PL/SQL: Advanced Cursors
  3. Oracle PL/SQL: Primary keys
  4. SQL Server 2008 Concurrency Problems and Isolation
  5. Oracle PL/SQL: Oracle System Tables

Tags: , , ,

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>