SET ROLE
Sets the current role for the session. Learn how to enable none, or a specific role to change your current privileges dynamically.
Syntax
SET ROLE { role | NONE }Description
Example
--Checking the current role status
SELECT CURRENT_ROLE;+--------------+
| CURRENT_ROLE |
+--------------+
| NULL |
+--------------+--Setting the staff role, and verifying the switch
SET ROLE staff;
SELECT CURRENT_ROLE;Last updated
Was this helpful?

