version and edition of SQL server code example
Example 1: SQl Server Versionen Releases
Release Buildversion
SQL Server 2019 15.0.4073.23
SQL Server 2017 14.0.1000.169
SQL Server 2016 13.0.1601.5
SQL Server 2014 12.0.2000.8
SQL Server 2012 11.0.2100.60
Example 2: version and edition of SQL Server Database Engine
--version and edition of SQL Server Database Engine is running
--Step: Connect to the instance of SQL Server, and then run the following query in SQL Server Management Studio (SSMS):
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')