How to Check Your SQL Server Version and Build

Connect to the Database Engine and run SELECT SERVERPROPERTY('ProductVersion'); to get its full build number. To check the edition, cumulative update (CU), and KB at the same time, use the query below.

T-SQL query for the SQL Server build, edition, CU and KB

Run this read-only query in SSMS, VS Code, or another SQL client. Any database on the target instance will do. For an availability group, connect to each replica directly if you need the patch level of every node.

SELECT
    CONVERT(nvarchar(128), SERVERPROPERTY('ServerName')) AS server_name,
    CONVERT(nvarchar(128), SERVERPROPERTY('ProductVersion')) AS engine_build,
    CONVERT(nvarchar(128), SERVERPROPERTY('ProductLevel')) AS product_level,
    CONVERT(nvarchar(128), SERVERPROPERTY('ProductUpdateLevel')) AS cu,
    CONVERT(nvarchar(128), SERVERPROPERTY('ProductUpdateReference')) AS update_kb,
    CONVERT(nvarchar(128), SERVERPROPERTY('Edition')) AS edition;
Result columnWhat it tells you
engine_buildFull engine version. Use all four parts to match a modern build.
product_levelOriginal release (RTM) or a service pack such as SP3.
cu and update_kbUpdate level and KB, where reported. Either can return NULL.
editionInstalled Database Engine edition, such as Standard or Developer.

A patched instance can still report RTM in product_level. That column describes the servicing baseline. Use engine_build to identify the actual patch.

Look up a SQL Server build number or KB

For example, 16.0.4135.4 is SQL Server 2022 CU14, introduced in KB5038325. For patch planning, match the full build, operating system, and servicing branch.

Try 16.0.4325.4, KB5125472, or SQL Server 2022 CU28. Enter one search per line. The page downloads the public catalogue and matches your entries in your browser.

This build history covers installed SQL Server instances, including SQL Server on a virtual machine. Azure SQL Database and Azure SQL Managed Instance use their own versioning.

Check the connected SQL Server version in SSMS

  1. Connect to the Database Engine in Object Explorer.
  2. Right-click the server name and select Properties.
  3. On the General page, read the Product and Version fields.

In a query window, SELECT @@VERSION; returns the engine build and environment details in a single line of output. It also works on very old SQL Server releases. For the Management Studio client version, use Help → About.

SSMS release historyDatabase compatibility levelsDownload build dataMicrosoft’s engine version guideMicrosoft SERVERPROPERTY reference