> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# version

> 返回当前 MySQL 数据库的版本。

返回当前 MySQL 数据库的版本。可以使用 `current_version` 函数查询 数据库 当前的版本。

## 语法

```Haskell theme={null}
version();
```

## 参数说明

无。该函数不接受任何参数。

## 返回值说明

返回 VARCHAR 类型的值。

## 示例

```Plain Text theme={null}
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.1.0     |
+-----------+
1 row in set (0.00 sec)
```

## 相关文档

[current\_version](/documents/cn/4.2/sql-reference/sql-functions/utility-functions/current_version.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.