In case you need to know what version of SQL Server you are currently using, you can use the queries below.
Starting at SQL Server 2000, you can use the following query.
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
The above query is applicable for SQL Server 2000, SQL Server 2005 and SQL Server 2008. For SQL Server 7 and SQL Server 6.5 series. The code below should be used.
If you are not sure what version of SQL Server you have, use the second query. It still works as it isn’t deprecated yet. The new version is handy if you need to get the details programmatically.