current_user function

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime 10.0 and above

Returns the user executing the statement. current_user is an alias for user.

Syntax

current_user()

Arguments

This function takes no arguments.

Returns

A STRING.

The braces are optional.

Examples

> SELECT current_user();
 user1

> SELECT current_user;
 user1