SQL SYSTEM_USER() is an inbuilt function that is used for returning the login information for the current user in the SQL SERVER or MySQL database. It returns the login name information for the current user. For the MySQL database, The SYSTEM_USER() function returns the current user name and hostname for the MySQL connection.

SQL SYSTEM_USER()

If the user name and login name are different, the SYSTEM_USER returns the login name. You can use the SYSTEM_USER with DEFAULT constraints in the  CREATE TABLE and  ALTER TABLE statements.

Syntax

SYSTEM_USER;

#sql system_user #sql #mysql #sql server #create table #alter table

SQL SYSTEM_USER() Function Example
1.20 GEEK