How to know SQL Server version and Service Pack(SP)

Many time I stuck with a question… what is this DB Server version and what Service pack is installed on it? What is the easiest way to know DB edition? I asked this question to a friend of mine and he gave me the following simple Select statement that answered my questions.

SELECT SERVERPROPERTY(‘productversion’) AS version

, SERVERPROPERTY (‘productlevel’) AS SP

, SERVERPROPERTY (‘edition’) AS DbEdition

 

I hope you will find it useful 🙂

Leave a Reply

Your email address will not be published.