方法一:
方法二:
方法三:
SELECT
SERVERPROPERTY('servername') AS 实例名,
SERVERPROPERTY('ProductVersion') AS 实例版本,
SERVERPROPERTY('Edition') AS 产品版本,
SERVERPROPERTY('ProductLevel') AS 版本级别,
@@VERSION AS 版本信息
SELECT SERVERPROPERTY('Edition') AS Edition ,
CASE SERVERPROPERTY('EditionID')
WHEN 1804890536 THEN 'Enterprise Edittion: CAL Lincenseing'
WHEN 1872460670 THEN 'Enterprise Edition: Core-based Licensing'
WHEN 610778273 THEN 'Enterprise Evaluation'
WHEN 284895786 THEN 'Business Intelligence'
WHEN -2117995310 THEN 'Developer'
WHEN -1592396055 THEN 'Express'
WHEN -133711905 THEN 'Express with Advanced Services'
WHEN -1534726760 THEN 'Standard'
WHEN 1293598313 THEN 'Web'
ELSE '' END AS License
方法四:
exec xp_msver
更多参考:SERVERPROPERTY (Transact-SQL)