Skip to main content
Version: Latest-4.1

current_role

Queries roles that are activated for the current user.

Syntax​

current_role();
current_role;

Parameters​

None.

Return value​

Returns a VARCHAR value.

Examples​

mysql> select current_role();
+----------------+
| current_role() |
+----------------+
| db_admin |
+----------------+
Rocky the happy otterStarRocks Assistant

AI generated answers are based on docs and other sources. Please test answers in non-production environments.