# **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**

```text
> CURRENT_ROLE_NAME()
```

## **Example**

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