メインコンテンツまでスキップ
バージョン: 26.x

CURRENT_USER

説明

現在のユーザー名とそのIPルールホワイトリストを取得します。

構文

CURRENT_USER()

戻り値

現在のユーザー名とそのIPホワイトリストを返します。

フォーマット:<user_name>@<ip_white_list>

  • rootユーザー、IP制限なし
select current_user();
+----------------+
| current_user() |
+----------------+
| 'root'@'%' |
+----------------+
  • doris ユーザー、IP ホワイトリストは 192.168.* です
select current_user();
+---------------------+
| current_user() |
+---------------------+
| 'doris'@'192.168.%' |
+---------------------+
このページでは