Skip to content

CURRENT_ROLE_NAME()

Function Description

CURRENT_ROLE_NAME() is used to query the name of the role that the user you are currently logged in to.

Function Syntax

> CURRENT_ROLE_NAME()

Example

mysql> select current_role_name();
+--------------------------+
| current_role_name() |
+--------------------------+
| moadmin |
+--------------------------+
1 row in set (0.00 sec)