Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 38.1Mb
PDF (A4) - 38.1Mb
PDF (RPM) - 37.3Mb
HTML Download (TGZ) - 10.2Mb
HTML Download (Zip) - 10.3Mb
HTML Download (RPM) - 8.9Mb
Man Pages (TGZ) - 217.0Kb
Man Pages (Zip) - 329.9Kb
Info (Gzip) - 3.5Mb
Info (Zip) - 3.5Mb
Excerpts from this Manual

26.4.5.20 The version_major() Function

This function returns the major version of the MySQL server. It was added in MySQL 5.7.9.

Parameters

None.

Return Value

A TINYINT UNSIGNED value.

Example
mysql> SELECT VERSION(), version_major();
+-----------------+-----------------+
| VERSION()       | version_major() |
+-----------------+-----------------+
| 5.7.9-debug-log |               5 |
+-----------------+-----------------+

User Comments
Sign Up Login You must be logged in to post a comment.