CURRENT_USER
Description
Get the current username and its IP rule whitelist.
Syntax
CURRENT_USER()
Return Value
Returns the current username and its IP whitelist.
Format:<user_name>@<ip_white_list>
Examples
- root user, no IP restrictions
select current_user();
+----------------+
| current_user() |
+----------------+
| 'root'@'%' |
+----------------+
- doris user, IP whitelist is 192.168.*
select current_user();
+---------------------+
| current_user() |
+---------------------+
| 'doris'@'192.168.%' |
+---------------------+