MySQL – Simple ways to know version number with @@version and version()

If you want to know the version number of MySQL server, there are two simple methods available.

You can use system variable @@VERSION as shown below

SELECT @@VERSION as mysql_version;

Other method is to use system function VERSION()

SELECT VERSION() as mysql_version

Both of them returns the following result

mysql_version
-----------------
5.6.35

Depends on the version of the server, you may get the different version number

Note : @@VERSION is already available in SQL Server database engine as a global variable to get the version information

Advertisement