user function

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

Returns the user executing the statement.

Syntax

user()

Arguments

This function takes no arguments.

Returns

A STRING.

The braces are optional.

user is an alias for current_user

Examples

> SELECT user();
 user1

> SELECT user;
 user1