The compatibility level for a database can be changed very easily using the ALTER DATABASE statement. Here is the basic syntax:
ALTER DATABASE database_name SET COMPATIBILITY_LEVEL = version;
For example, to change a database named ‘devdb’ to the SQL Server 2022 compatibility level:
ALTER DATABASE devdb SET COMPATIBILITY_LEVEL = 160;
No comments:
Post a Comment