Sets Transact-SQL and query processing behaviors to be compatible with the specified version of the SQL Server Database Engine.
EXEC dbo.sp_dbcmptlevel @dbname=N'Database01', @new_cmptlevel=90
ALTER DATABASE Database01
SET COMPATIBILITY_LEVEL = 90
Product | Database Engine Version | Default Compatibility Level Designation | Supported Compatibility Level Values |
---|---|---|---|
SQL Server 2019 preview | 15 | 150 | 150, 140, 130, 120, 110, 100 |
SQL Server 2017 (14.x) | 14 | 140 | 140, 130, 120, 110, 100 |
Azure SQL Database single database/elastic pool | 12 | 140 | 150, 140, 130, 120, 110, 100 |
Azure SQL Database managed instance | 12 | 140 | 150, 140, 130, 120, 110, 100 |
SQL Server 2016 (13.x) | 13 | 130 | 130, 120, 110, 100 |
SQL Server 2014 (12.x) | 12 | 120 | 120, 110, 100 |
SQL Server 2012 (11.x) | 11 | 110 | 110, 100, 90 |
SQL Server 2008 R2 | 10.5 | 100 | 100, 90, 80 |
SQL Server 2008 | 10 | 100 | 100, 90, 80 |
SQL Server 2005 (9.x) | 9 | 90 | 90, 80 |
SQL Server 2000 | 8 | 80 | 80 |
Sources:
Comments