SELECT
@@SERVERNAME AS ServerName,
'SQL Server Year '
+ CASE SUBSTRING(CONVERT(VARCHAR(50), SERVERPROPERTY('productversion')),
1, 2)
WHEN '8.' THEN '2000'
WHEN '9.' THEN '2005'
WHEN '10' THEN '2008'
WHEN '11' THEN '2012'
END AS SQLServerReleaseName ,
SERVERPROPERTY('ProductVersion') AS ProductVersion ,
SERVERPROPERTY('ProductLevel') AS ProductLevel ,
SERVERPROPERTY('Edition') AS Edition;
GO
No comments:
Post a Comment