我如何只获得SQL Server发行版? select @@version 检索完整信息,在我的情况下: Microsoft SQL Server 2008 R2 (RTM) – 10.50.1617.0 (X64) Apr 22 2011 19:23:43 Copyright (c) Microsoft Corporation Developer Edition (64-bit)
select @@version
检索完整信息,在我的情况下:
Microsoft SQL Server 2008 R2 (RTM) – 10.50.1617.0 (X64) Apr 22 2011 19:23:43 Copyright (c) Microsoft Corporation Developer Edition
(64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1)
我只需要Microsoft SQL Server 2008 R2.
建议?
怎么样:SELECT SERVERPROPERTY('Edition'), SERVERPROPERTY('ProductVersion')
我得到这个输出:
Developer Edition (64-bit) 10.50.2500.0
基于ProductVersion,您可以对人类可读的SQL Server版本名称进行“翻译”…
11.xx --> SQL Server 2012 10.50. --> SQL Server 2008 R2 10.00. --> SQL Server 2008 09.xx --> SQL Server 2005
等等