Declaration
CURRENT_ROLE()
Description
This function is used to view the role that is activated for the current user in the current session. If the query result is NONE, it means the current user has no activated role, and only the privileges of activated roles can be used by the user.
Examples
obclient [(none)]> SELECT CURRENT_ROLE();
The return result is as follows:
+-----------------------------+
| CURRENT_ROLE() |
+-----------------------------+
| `role002`@`%`,`role001`@`%` |
+-----------------------------+
1 row in set