check version number of sql server code example
Example 1: sql version query
SELECT @@VERSION AS 'SQL Server Version';
Example 2: how to know the sql server edition
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')