Categories:

Context Functions (Session)

CURRENT_USER

Returns the name of the user currently logged into the system.

Syntax

CURRENT_USER()

CURRENT_USER

Usage Notes

  • To comply with ANSI standards, this function can be called without parentheses.

Examples

This shows how to call the CURRENT_USER function:

SELECT CURRENT_USER();

Output:

+----------------+
| CURRENT_USER() |
|----------------|
| TSMITH         |
+----------------+