What's the current version of MS SQL Server used?

You often need to check for the version used. Each version of SQL Server have different capabilities and SQL syntax.

Select @@Version as 'SQL Server Version Used';


SQL Server Version Used
------------------------------------------------------------------------
Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) 
	Feb  9 2007 22:47:07 
	Copyright (c) 1988-2005 Microsoft Corporation
	Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 2)


(1 row(s) affected)

@@version did not report Windows 2003 Server Standard Edition but did report it as:

Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 2)