©SQL :: Manager
HomeProgram InformationTechnical detailsFree downloadDonate for a cup of coffee
myway SQL Manager for MySQL and MariaDB, Download on Uptodown
SQL functionMySQLMariaDB

The VERSION SQL Function in MySQL and MariaDB - Server version

VERSIONSyntax:VERSION()
Return value:CHAR
Function type:Information function
Function Description

The function VERSION() returns a string that indicates the server version.

Example for MariaDB

 1
 2
 3

SELECT version();

version()
varchar(32) BINARY
10.5.13-MariaDB-0ubuntu0.21.04.1

Example for MySQL

 1
 2
 3

SELECT version();

version()
varchar(6) BINARY
8.0.23
The examples were created with the MyWAY SQL manager: Download

How to use the VERSION() function in MySQL and MariaDB databases

In MySQL and MariaDB the VERSION() function is used to get the version information of the database server, by returning a string representing the version number of the server. The function requires no arguments and can be used directly in an SQL statement or within a query.

The function is used in database administration and maintenance tasks, for example, and offers a quick and easy way to check the MySQL or MariaDB server version with which the application is connected. The feature is also useful for compatibility checks, which involves checking the server version and ensuring that queries or application code are compatible with the specific version of the database server being used, since different versions of database servers can have different syntax or behavior. The VERSION() function is also used in application logging and debugging to display or log the database server version in the logs or application user interface.

The version string typically includes major and minor version numbers, as well as additional information such as release or build numbers.
VAR_POPVAR_SAMPVARIANCEVERSIONWEEKWEEKDAYWEEKOFYEAR

Further MySQL und MariaDB SQL Information functions

BENCHMARKBENCHMARK(Number, Expression)
More about BENCHMARK Function

BINLOG_GTID_POSBINLOG_GTID_POS()

CHARSETCHARSET(String)
More about CHARSET Function

COERCIBILITYCOERCIBILITY(String)
More about COERCIBILITY Function

COLLATIONCOLLATION(String)
More about COLLATION Function

CONNECTION_IDCONNECTION_ID()
More about CONNECTION_ID Function

CURRENT_USERCURRENT_USER()
More about CURRENT_USER Function

CURRENT_ROLECURRENT_ROLE()
More about CURRENT_ROLE Function

DATABASEDATABASE()
More about DATABASE Function

DECODE_HISTOGRAMDECODE_HISTOGRAM()

DEFAULTDEFAULT(Column)
More about DEFAULT Function

FOUND_ROWSFOUND_ROWS()
More about FOUND_ROWS Function

LAST_INSERT_IDLAST_INSERT_ID([Expression])
More about LAST_INSERT_ID Function

LAST_VALUELAST_VALUE(Expression [, Expression ...])
More about LAST_VALUE Function

ROWNUMROWNUM()

ROW_COUNTROW_COUNT()
More about ROW_COUNT Function

SCHEMASCHEMA()
More about SCHEMA Function

SESSION_USERSESSION_USER()
More about SESSION_USER Function

SYSTEM_USERSYSTEM_USER()
More about SYSTEM_USER Function

USERUSER()
More about USER Function

Numeric functionsString functionsRegular ExpressionsDate and Time functions
Comparison functionsEncryption & CompressionConversion functionsNULL functions
Aggregate functionsWindow functionsJSON functionsGeometric functions
Sequence functionsInformation functionsDynamic ColumnsMiscellaneous functions
More information about the VERSION SQL function: mysql.com and mariadb.com
Updated: 2023-09-17ImprintContactTerms & conditionsPrivacy & CookiesUpdatesSitemapFacebookLinkedinTwitterStatistics©2020-2024 Heino Cunze-Fischer