नोट
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप साइन इन करने या निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
Applies to:
Databricks SQL
Databricks Runtime 10.4 LTS and above
Returns the user executing the statement. current_user is an alias for user.
Note
The SQL standard differentiates between CURRENT_USER and SESSION_USER.
In Databricks SQL and Databricks Runtime 14.1 and above you should use SESSION_USER instead of CURRENT_USER or USER.
Syntax
current_user()
Arguments
This function takes no arguments.
Returns
A STRING.
The braces are optional.
Note
When called by a service principal, this function returns the UUID of the service principal instead of a readable name.
Examples
> SELECT current_user();
user1
> SELECT current_user;
user1