当前位置:Gxlcms > 数据库问题 > MySQL内置函数-版本、用户等函数

MySQL内置函数-版本、用户等函数

时间:2021-07-01 10:21:17 帮助过:32人阅读

version(); +-----------+ | version() | +-----------+ | 8.0.18 | +-----------+ 1 row in set (0.00 sec)

查看当前数据库

mysql> select database();
+------------+
| database() |
+------------+
| world      |
+------------+
1 row in set (0.00 sec)

查看当前用户

mysql> select user();
+----------------+
| user()         |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)

查看uuid

UUID一共五部分:

  • 前三部分是根据时间戳生成的
  • 第四部分是保留时间的唯一性
  • 第五部分是根据网卡生成的
mysql> select uuid();
+--------------------------------------+
| uuid()                               |
+--------------------------------------+
| ac8a84eb-aacc-11ea-b4fc-000c295e277d |
+--------------------------------------+
1 row in set (0.00 sec)

 

MySQL内置函数-版本、用户等函数

标签:第四部分   函数   版本   mysql内置函数   root   style   根据   时间   数据库   

人气教程排行