Oracle Tutorial

What is Oracle
SQL Keywords

Oracle Wildcards

Oracle Wildcards

Oracle Aliases

Oracle Aliases

MySQL Tutorial

MySQL Tutorial

PL/SQL Tutorial

PL/SQL Tutorial

Oracle Interview Questions

Oracle Interview Questions and Answers


Oracle SET TRANSACTION Statement

In Oracle, the SET TRANSACTION statement allows you to set read-only, read/write, isolation level transaction and assign a name to a transaction.

Oracle SET TRANSACTION Statement Syntax

To set read-only, read/write, isolation level transaction and assign a name to a transaction, use the following syntax:

Syntax

SET TRANSACTION [ READ ONLY | READ WRITE ]
                [ ISOLATION LEVEL [ SERIALIZE | READ COMMITED ]
                [ USE ROLLBACK SEGMENT 'segment_name' ]
                [ NAME 'transaction_name' ];

Parameters:

READ ONLY: Optional. If specified, it sets the transaction as a read-only transaction.

READ WRITE : Optional. If specified, it sets the transaction as a read/write transaction.

ISOLATION LEVEL : Optional. If specified, it has two options: ISOLATION LEVEL SERIALIZE and ISOLATION LEVEL READ COMMITTED.

USE ROLLBACK SEGMENT: Optional. If specified, it assigns the transaction to a rollback segment.

NAME : Assigns a name to the transaction.

Oracle SET TRANSACTION examples with READ ONLY

The following Oracle statement shows how to use the SET TRANSACTION statement in Oracle:

Example

SET TRANSACTION READ ONLY NAME 'RO_Demo';

Note:

In the above example shows how to use the SET TRANSACTION statement in Oracle..

Oracle SET TRANSACTION examples with READ WRITE

The following Oracle statement shows how to set a transaction as read/write using the SET TRANSACTION statement:

Example

SET TRANSACTION READ WRITE NAME 'RW_Demo';

Note:

In the above example shows that how to set a transaction as read/write using the SET TRANSACTION statement.