Collections:
CURRENT_ROLE() - Current Role of Logged-In User
How to obtain the current role of the logged-in user using the CURRENT_ROLE() function?
✍: FYIcenter.com
CURRENT_ROLE() is a MySQL built-in function that
returns the current role of the logged-in user.
For example:
SELECT CURRENT_ROLE(); -- +----------------+ -- | CURRENT_ROLE() | -- +----------------+ -- | NONE | -- +----------------+
Reference information of the CURRENT_ROLE() function:
CURRENT_ROLE(): role Returns the current role of the logged-in user. Arguments, return value and availability: role: Return value. The current role of the logged-in user. Available since MySQL 4.0.
⇒ CURRENT_USER() - Authentication Name of Current User
⇐ CONNECTION_ID() - Thread ID of Current Connection
2024-07-15, 2647🔥, 0💬
Popular Posts:
What Are Date and Time Functions in MySQL? MySQL offers a number of functions for date and time valu...
How To Convert Numeric Expression Data Types using the CAST() Function in SQL Server Transact-SQL? I...
How To Escape Special Characters in SQL statements in MySQL? There are a number of special character...
How to set the current database in SQL Server? Once you are connected to the SQL Server, you should ...
How Fixed Length Strings Are Truncated and Padded in SQL Server Transact-SQL? When the length of the...