Share via


Funzione current_user

Si applica a:segno di spunta sì Databricks SQL segno di spunta sì Databricks Runtime 10.4 LTS e versioni successive

Restituisce l'utente che esegue l'istruzione . current_user è un alias per l'utente.

Nota

Lo standard SQL distingue tra CURRENT_USER e SESSION_USER. In Databricks SQL e Databricks Runtime 14.1 e versioni successive è consigliabile usare SESSION_USER anziché CURRENT_USER o USER.

Sintassi

current_user()

Argomenti

Questa funzione non accetta argomenti

Valori restituiti

Un oggetto STRING.

Le parentesi graffe sono facoltative.

Esempi

> SELECT current_user();
 user1

> SELECT current_user;
 user1