Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Applies to:
Databricks SQL
Databricks Runtime 10.4 LTS and above
Returns the user executing the statement. current_user is an alias for session_user.
Warning
This function is deprecated. The SQL standard reserves CURRENT_USER for the authorized user, but in Azure Databricks it returns the session user, which can be misleading. Use session_user instead.
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