How to know the SQL service pack and CU installed

Dear All,

I have SQL 2012 installed in my environment, i need to know what's the service pack installed and the cumulative update installed as well, is there any commands or a way to know that?

please help
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SELECT @@Version

Open in new window

And compare that to the versions at the website.
Anthony PerkinsCommented:
I would use:
Combination of both above.

LEFT (@@Version,25) AS SQLServerType,
SERVERPROPERTY('Edition') AS Edition,
SERVERPROPERTY('ProductVersion') AS ProductVersion,
SERVERPROPERTY('ProductLevel') AS ProductLevel;

You'll still have to cross reference the Product Version on  to get the exact CU level.

10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

RhalaAuthor Commented:
I would ask where i have to run these commands??
In the SQL Server Management Studio
RhalaAuthor Commented:
dear Tony303,

Could you please provide more info, where exactly i can run it after i open the SQL server management Studio??
Anthony PerkinsCommented:
1. Run SQL Server Management.
2.  Connect to the appropriate server by entering the name and your user credentials using either SQL Server Authentication (User name and Password) or Windows Authentication.
3. Start a new query window by either
          A. Clicking on the "New Query" icon or
          B. Selecting the File |New | Query with Current Connection menu or
          C. Entering Ctrl+ N
4. Copy and paste the SELECT statement into the Query window.
5. Run it by:
        A. Clicking on the Execute" icon or
        B. Selecting the Query | Execute menu
        C. Entering F5
6. Inspect the results in the Results window.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.