To find the version of the SQL Server that you are working with, you can type the following simple query:
The query is not case sensitive. Your results should look something like:
Microsoft SQL Server 2008 R2 (RTM) – 10.50.1600.1 (Intel X86) Apr 2 2010 15:53:02 Copyright (c) Microsoft Corporation Express Edition with Adv..
Tested on SQL Server 2005 & 2008