|
The Microsoft SQL Server T-SQL system variable
@@version contains the version signature of the server. SERVERPROPERTY provides specific information. Usage:
select @@Version
-- SQL Server version and service pack information
USE master;
GO
SELECT
'Microsoft SQL Server ' +
convert(varchar, SERVERPROPERTY('ProductVersion') ) + ' -- ' +
convert(varchar, SERVERPROPERTY('ProductLevel') ) + ' -- ' +
convert(varchar, SERVERPROPERTY('Edition') );
GO
/*
Microsoft SQL Server 10.0.2531.0 -- SP1 -- Enterprise Edition
*/
|