1. Select @@version
2. Run below Query in SSMS
Select
Case
When Convert(Varchar(128), ServerProperty ('ProductVersion')) like '9%' Then 'SQL Server 2005'
When Convert(Varchar(128), ServerProperty('ProductVersion')) like '10.0%' Then 'SQL Server 2008'
When Convert(Varchar(128), ServerProperty('ProductVersion')) like '10.5%' Then 'SQL Server 2008 R2'
When Convert(Varchar(128), ServerProperty('ProductVersion')) like '11%' Then 'SQL Server 2012'
When Convert(Varchar(128), ServerProperty('ProductVersion')) like '12%' Then 'SQL Server 2014'
When Convert(Varchar(128), ServerProperty('ProductVersion')) like '13%' Then 'SQL Server 2016'
Else 'Unspecified'
End as Version,
ServerProperty('Edition') as Edition,
ServerProperty('ProductLevel') as ProductLevel,
ServerProperty('ProductVersion') as ProductVersion
2. Run below Query in SSMS
Select
Case
When Convert(Varchar(128), ServerProperty ('ProductVersion')) like '9%' Then 'SQL Server 2005'
When Convert(Varchar(128), ServerProperty('ProductVersion')) like '10.0%' Then 'SQL Server 2008'
When Convert(Varchar(128), ServerProperty('ProductVersion')) like '10.5%' Then 'SQL Server 2008 R2'
When Convert(Varchar(128), ServerProperty('ProductVersion')) like '11%' Then 'SQL Server 2012'
When Convert(Varchar(128), ServerProperty('ProductVersion')) like '12%' Then 'SQL Server 2014'
When Convert(Varchar(128), ServerProperty('ProductVersion')) like '13%' Then 'SQL Server 2016'
Else 'Unspecified'
End as Version,
ServerProperty('Edition') as Edition,
ServerProperty('ProductLevel') as ProductLevel,
ServerProperty('ProductVersion') as ProductVersion
0 comments: