This is a read-only copy of the MariaDB Knowledgebase generated on 2024-12-22. For the latest, interactive version please visit https://mariadb.com/kb/.

CURRENT_ROLE

MariaDB starting with 10.0.5

I ruoli sono stati introdotti in MariaDB 10.0.5.

Sintassi

CURRENT_ROLE, CURRENT_ROLE()

Spiegazione

Restituisce il nome del ruolo corrente, che determina i privilegi. Il valore restituito è una stringa codificate nel character set utf8.

Se nessun ruolo è selezionato, restituisce NULL.

Esempi

SELECT CURRENT_ROLE;
+--------------+
| CURRENT_ROLE |
+--------------+
| NULL         |
+--------------+

SET ROLE staff;

SELECT CURRENT_ROLE;
+--------------+
| CURRENT_ROLE |
+--------------+
| staff        |
+--------------+
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.