In this article, you’ll learn how to check a database’s compatibility level in SQL Server. There are different ways to check the compatibility level of a database in SQL Server.
In SQL Server, to check the compatibility level of a database, you need to query any of these below-mentioned codes to know the compatibility levels of the database. Here's how you can do it:
SELECT name as 'Database Name', compatibility_level
FROM sys.databases
WHERE name = 'Employee';
Database Name compatibility_level
------------------------ ------------------------------
Employee 150
EXEC sp_helpdb Employee;
EXEC sp_dbcmptlevel Employee;
The current compatibility level is 150.
I hope this article will help you to understand how to check a database’s compatibility level in SQL Server.
Share your valuable feedback, please post your comment at the bottom of this article. Thank you!
Comments