Locks can be requested either implicitly or explicitly.
If you want to set explicit or implicit locks, and you are waiting too long for a lock to be released, then a message is sent to the database system. The user can then respond to this message, for example, by terminating the transaction. In this case, the database system does not execute an implicit ROLLBACK.
You can choose the lock type by specifying an isolation level when you open the database session. The database system then requests locks implicitly during processing of an SQL statement in accordance with the specified isolation level. All other SQL statements (such as INSERT, UPDATE, DELETE) always request an exclusive lock .
You can use the LOCK statement to assign locks to a transaction explicitly. You can specify a LOCK option in an SQL statement to lock individual rows in a table. This is possible at every isolation level.
You can use the LOCK option to temporarily change the isolation level for an SQL statement.