Thursday, October 15, 2009

Sql Server Quick reference : How to

How to get the version of Sqlserver ?
Step 1 :
Open query analyser and execute the following
Select serverproperty('productversion'), serverproperty('productlevel'), serverproperty('edition')

Step 2 :
If Output is 10.0.1600.22 for first field then its sqlserver 2008
If Output is 9.00.3257.00 for first field then its sqlserver 2005

For further details :

Common Solution for T-sql problems

Recursive Queries Using Common Table Expressions