UNLOCK statement 

The UNLOCK statement releases locks on rows.

Syntax

<unlock_statement> ::= UNLOCK <row_spec>... IN SHARE MODE
| UNLOCK <row_spec>... IN EXCLUSIVE MODE
| UNLOCK <row_spec>... IN SHARE MODE <row_spec>... IN EXCLUSIVE MODE
| UNLOCK <row_spec>... OPTIMISTIC

row_spec

Explanation

SHARE locks, optimistic locks, and exclusive locks (see transactions) set for single table rows that have not yet been updated can be released within a transaction using the unlock statement.

Exclusive locks are created by inserting, updating, or deleting a row or are set in the same way as optimistic locks, by specifying LOCK options in SELECT statements and by LOCK statements. As long as the locked row has not been updated or deleted, the exclusive lock can be cancelled using the UNLOCK statement.

The unlock statement does not fail if the specified lock does not exist or cannot be released.