# SET ISOLATION statement

The SET ISOLATION statement changes the isolation level for a user's connection.

Valid isolation levels are SERIALIZABLE, REPEATABLE READ, READ COMMITTED, and READ UNCOMMITTED.

Issuing this statement always commits the current transaction. The JDBC java.sql.Connection.setTransactionIsolation method behaves almost identically to this command, with one exception: if you are using the embedded driver, and if the call to java.sql.Connection.setTransactionIsolation does not actually change the isolation level (that is, if it sets the isolation level to its current value), the current transaction is not committed.

For information about isolation levels, see "Locking, concurrency, and isolation" in the Derby Developer's Guide. For information about the JDBC java.sql.Connection.setTransactionIsolation method, see java.sql.Connection.setTransactionIsolation method.

## Syntax

    SET [ CURRENT ] ISOLATION [ = ]
    {
        UR | DIRTY READ | READ UNCOMMITTED |
        CS | READ COMMITTED | CURSOR STABILITY |
        RS |
        RR | REPEATABLE READ | SERIALIZABLE |
        RESET
    }

## Example

    set isolation serializable;

Parent topic: SET statements
Related reference
SET CONSTRAINTS statement
SET ROLE statement
SET SCHEMA statement