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

SET ROLE

MariaDB starting with 10.0.5

I ruoli sono stati introdotti in MariaDB 10.0.5.

Sintassi

SET ROLE { ruolo | NONE }

Spiegazione

L'istruzione SET ROLE abilita un ruolo per la sessione corrente. Per deselezionarlo, si usi NONE .

Se il ruolo non esiste, o non è stato assegnato all'utente corrente, si ottiene un ERROR 1959 (OP000): Invalid role specification.

Esempio

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.