ID EN
Information Functions

SYSTEM_USER()

MySQL 8.4

SYSTEM_USER() is a synonym for USER().

Syntax

MYSQL
CREATE TABLE t (c VARCHAR(288) DEFAULT (SYSTEM_USER()));

Examples

Example

The SYSTEM_USER() function is distinct from the SYSTEM_USER privilege. The former returns the current MySQL account name. The latter distinguishes the system user and regular user account categories (see Section 8.2.11, “Account Categories”).

MYSQL
CREATE TABLE t (c VARCHAR(288) DEFAULT (SYSTEM_USER()));