As an SQL DBA or even an SQL developer, it is crucial to know how to check what version of SQL Server is running. In this article, I will walk you through all the approaches to achieving this.
How To See What Version Of SQL Server Is Running
Let us discuss each approach individually.
Approach-1: Using SQL Server Management Studio Object Explorer
To see what version of SQL server is running, follow the below steps
1. Open the SQL Server Management Studio and connect to your SQL server instance.
2. You will find the SQL server version in the name of the Object Explorer, as shown in the screenshot below.

You can check the respective product names as shown in the below table based on the version number.

Approach-2: Using SELECT @@VERSION
You can also use the SELECT @@VERSION statement as mentioned below for this purpose.
SELECT @@VERSION AS 'SQL Server Version'
Even you can also use the query like below.
SELECT @@VERSION
After executing the above query, I got the successfull output, as you can see in the screenshot below.

Approach-3: Using the Object explorer properties
1. Right-click on the object explorer and then select the Properties option.

2. On the Properties window, you will see the Version, as shown in the screenshot below.

Approach-4: Using the SERVERPROPERTY method
You can also get the version information from the error log file.
1. Execute the below query to get the error file log path.
Select SERVERPROPERTY ( 'ErrorLogFileName' ) as 'Error Log Path'
After executing the query, you will get the path of your error log file, as shown in the screenshot below.

2. Now, navigate to the above path on your local machine and see the version in the screenshot below.

Or, You can also use the query as specified below to see the version number, as shown in the screenshot below.
Select SERVERPROPERTY ( 'ProductVersion' ) as 'SQL Server Version'

Conclusion
In order to work with SQL server, it is crucial to know what version of sql server is installed on your machine. You can use any of the approaches mentioned in this article to achieve this.
You may also like following the articles below.
- How To Get The Connection String From SQL Server
- How To Reset SA Password In SQL Server
- How To Check SQL Server Edition
- How To Check Datatype Of Column In SQL Server
- How to Add Column to a Table in SQL Server?

Rajkishore Sahoo is a Microsoft Azure consultant with more than 14 years of hands-on experience building cloud-native data solutions across Azure and AWS, focused on Azure SQL Database, Azure SQL Managed Instance, and the pipelines that connect them to production apps. Day to day, he provisions Azure SQL instances, configures firewalls and connection strings, tunes queries for cloud workloads, and wires databases into Azure Functions and Logic Apps. Read more