Specifies the role, warehouse, database, or schema to use for the current session.
Viewing the current session context
To view the current role, secondary roles, database, schema, and warehouse for the session, use the corresponding context functions.
For example:
SELECT CURRENT_ROLE(),
CURRENT_SECONDARY_ROLES(),
CURRENT_WAREHOUSE(),
CURRENT_DATABASE(),
CURRENT_SCHEMA();
+----------------+--------------------------+---------------------+--------------------+------------------+
| CURRENT_ROLE() | CURRENT_SECONDARY_ROLES | CURRENT_WAREHOUSE() | CURRENT_DATABASE() | CURRENT_SCHEMA() |
|----------------+--------------------------+---------------------+--------------------+------------------|
| SYSADMIN | ALL | MYWH | MYTESTDB | PUBLIC |
+----------------+--------------------------+---------------------+--------------------+------------------+
For more details, see Context functions.