1 mysql> select current_user(); 2 +----------------+ 3 | current_user() | 4 +----------------+ 5 | root@localhost | 6 +----------------+ 7 1 row in set 8 9 mysql> select current_user; 10 +----------------+ 11 | current_user | 12 +----------------+ 13 | root@localhost | 14 +----------------+ 15 1 row in set 16 17 mysql> select user(); 18 +----------------+ 19 | user() | 20 +----------------+ 21 | root@localhost | 22 +----------------+ 23 1 row in set 24 25 mysql>
3种方式都可以
时间: 2024-10-14 19:16:47