The SET statement alters the properties of a
session.Syntax
<set_statement> ::= SET ROLE ALL [EXCEPT <role_name>] | SET ROLE NONE
| SET ROLE <role_name> [IDENTIFIED BY <password>]
| SET ISOLATION LEVEL <unsigned_integer>
Explanation
SET ROLE
DEFAULT ROLE in the
ALTER USER statement or ALTER USERGROUP statement specifies which of the roles assigned to the current user or user group is active in the user session or group member session. If a role is active, the current user has all the privileges that are included in the role.If a role that is activated automatically when a session is opened is assigned to the current user with the alter user statement or ALTER USERGROUP statement, it is deactivated when the set statement is executed if it is not identified by the SET ROLE specification in the set statement.
ISOLATION LEVEL
The isolation level specified in the
CONNECT statement defines when locks are set implicitly and how long they are retained. A LOCK option can be defined for individual SQL statements for data retrieval in order to change the lock behavior for this SQL statement.The set statement with isolation level changes the lock behavior for all subsequent SQL statements of the current session.