DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE
 
 
SITE SEARCH SQLUSA.com VIDEOS
 
 
SQL E/BOOKS   WORLD, USA & SQL NEWS   FORMAT
SCRIPTS SQL 2005 SQL 2008 ARTICLES
How to find the server version?

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

*/

-- Change database compatibility level

exec sp_dbcmptlevel AdventureWorks2012, 120;

 

-- Check database compatibility level

exec sp_dbcmptlevel AdventureWorks2012;

-- The current compatibility level is 120.

 

 

Related articles:

How to identify your SQL Server version and edition

SQL Server Version Database

 

Exam Prep 70-461
SQL 2016 DESIGN & PROGRAMMING
 
 
 
DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE