Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: SQL
Expertise: Beginner
Mar 25, 2008

Determine the Version and Build Information for Microsoft SQL Server

Use the following query to determine the version and build information for Microsoft SQL Server:

select @@microsoftversion / 0x01000000 as version, 
    cast(cast(@@microsoftversion as binary(2)) as int) as build;
The query returns the version number will be 7 for SQL Server 7.0, 8 for SQL Server 2000, 9 for SQL Server 2005 and 10 for SQL Server 2008. To determine the service pack level and edition information, please refer to this Microsoft Knowledge Base article.

Alexander Ocher
Thanks for your registration, follow us on our social networks to keep up-to-date