Mengembalikan nama pengguna dan nama host MySQL saat ini sebagai string dalam kumpulan karakter utf8mb3.
SELECT USER();
'davida@localhost'
The value indicates the user name you specified when connecting to the server, and the client host from which you connected. The value can be different from that of CURRENT_USER().
SELECT USER();
'davida@localhost'
This function can be used for the default value of a VARCHAR or TEXT column, as shown in the following CREATE TABLE statement:
CREATE TABLE t (c VARCHAR(288) DEFAULT (USER()));