In MySQL, CURRENT_ROLE()
is a built-in function that returns the current active roles for the current session, separated by commas, or NONE
if there are none. The current role determines our access privileges.
Tag: system functions
MySQL COERCIBILITY() Explained
In MySQL, the COERCIBILITY()
returns the collation coercibility value of its string argument.
The COERCIBILITY()
function defines how collations will be converted in the case of collation conflict. In such conflicts, an expression with a higher coercibility is converted to the collation of an expression with a lower coercibility.
How CONNECTION_ID() Works in MySQL
The MySQL CONNECTION_ID()
function returns the connection ID (thread ID) for the connection.
In MySQL, every connection has an ID that is unique among the set of currently connected clients. We can use the CONNECTION_ID()
function to return that ID.
MySQL VERSION() Explained
In MySQL, VERSION()
is a built-in function that returns the MySQL server version.
The result is a string that uses the utf8mb3
character set. A suffix may also be appended to the version number indicating server build or configuration information.
MySQL SESSION_USER() Explained
In MySQL, SESSION_USER()
is a synonym for the USER()
function. It returns the current MySQL user name and host name, given when connecting to MySQL.
MySQL SYSTEM_USER() Explained
In MySQL, SYSTEM_USER()
is a synonym for the USER()
function. It returns the current MySQL user name and host name, given when connecting to MySQL.
MySQL CURRENT_USER() Explained
In MySQL, CURRENT_USER()
is a built-in function that returns the user name and host name combination for the MySQL account that the server used to authenticate the current client.
MySQL USER() Explained
In MySQL, USER()
is a built-in function that returns the current MySQL user name and host name, given when connecting to MySQL.
The result is returned as a string in the utf8mb3
character set.
The value returned by USER()
could be different to the value returned by CURRENT_USER()
.
UID – Return the ID of the Current Session in Oracle
In Oracle Database, the UID
function returns an integer that uniquely identifies the session user (the user who logged on).
USER Function in Oracle
In Oracle Database, the USER
function returns the name of the session user (the user who logged on).