Mysql Version Function

MySQL: VERSION Function

This tutorial explains how to use the MySQL VERSION function with syntax and examples.

Description

The MySQL VERSION function returns the version of the MySQL database.

Syntax

The syntax for the VERSION function in MySQL is:

VERSION( )

Parameters or Arguments

There are no parameters or arguments for the VERSION function in MySQL.

Note

  • The VERSION function uses the utf8 character set (starting in MySQL 4.1).

Applies To

The VERSION function can be used in the following versions of MySQL:

  • MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23

Example

Let's look at some MySQL VERSION function examples and explore how to use the VERSION function in MySQL.

For example:

mysql> SELECT VERSION();

Since the VERSION function returns the version of the MySQL database, it might display something like this:

mysql> SELECT VERSION();
Output: '5.5.35-0ubuntu0.12.04.2'