SQL USER_NAME Function

Example

Return the database user name (will return the current user since no id is specified):

SELECT USER_NAME();

Definition and Usage

The USER_NAME() function returns the database user name based on the specified id.

If no id is specified, this function will return the name of the current user.

Syntax

USER_NAME(id_number)

Continue reading SQL USER_NAME Function