Skip to content

Commit 31523da

Browse files
authored
Update alter-database-transact-sql-compatibility-level.md
1 parent b7d9d29 commit 31523da

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/t-sql/statements/alter-database-transact-sql-compatibility-level.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,15 @@ For all installations of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md
105105
> For more information on discontinued functionality, see [Discontinued Database Engine Functionality in SQL Server 2016](../../database-engine/discontinued-database-engine-functionality-in-sql-server-2016.md), [Discontinued Database Engine Functionality in SQL Server 2014](http://msdn.microsoft.com/library/ms144262(v=sql.120)), [Discontinued Database Engine Functionality in SQL Server 2012](http://msdn.microsoft.com/library/ms144262(v=sql.110)), and [Discontinued Database Engine Functionality in SQL Server 2008](http://msdn.microsoft.com/library/ms144262(v=sql.100)).
106106
107107
> [!IMPORTANT]
108-
> Breaking changes introduced in a given [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] version **may** not be protected by compatibility level. [!INCLUDE[tsql](../includes/tsql-md.md)] behavior is usually protected by compatibility level. However, changed or removed system objects are **not** protected by compatibility level.
108+
> Breaking changes introduced in a given [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] version **may** not be protected by compatibility level. [!INCLUDE[tsql](../../includes/tsql-md.md)] behavior is usually protected by compatibility level. However, changed or removed system objects are **not** protected by compatibility level.
109109
>
110110
> An example of a breaking change **protected** by compatibility level is an implicit conversion from datetime to datetime2 data types. Under database compatibility level 130, these show improved accuracy by accounting for the fractional milliseconds, resulting in different converted values. To restore previous conversion behavior, set the database compatibility level to 120 or lower.
111111
>
112112
> Examples of breaking changes **not protected** by compatibility level are:
113113
> - Changed column names in system objects. In [!INCLUDE[ssSQL11](../../includes/sssql11-md.md)] the column *single_pages_kb* in sys.dm_os_sys_info was renamed to *pages_kb*. Regardless of the compatibility level, the query `SELECT single_pages_kb FROM sys.dm_os_sys_info` will produce error 207 (Invalid column name).
114114
> - Removed system objects. In [!INCLUDE[ssSQL11](../../includes/sssql11-md.md)] the `sp_dboption` was removed. Regardless of the compatibility level, the statement `EXEC sp_dboption 'AdventureWorks2016CTP3', 'autoshrink', 'FALSE';` will produce error 2812 (Could not find stored procedure 'sp_dboption').
115115
>
116-
> For more information on breaking changes, see [Breaking Changes to Database Engine Features in SQL Server 2017](../../sql/database-engine/breaking-changes-to-database-engine-features-in-sql-server-2017.md), [Breaking Changes to Database Engine Features in SQL Server 2016](../../sql/database-engine/breaking-changes-to-database-engine-features-in-sql-server-2016.md), [Breaking Changes to Database Engine Features in SQL Server 2014](http://msdn.microsoft.com/library/ms143179(v=sql.120)), [Breaking Changes to Database Engine Features in SQL Server 2012](http://msdn.microsoft.com/library/ms143179(v=sql.110)), and [Breaking Changes to Database Engine Features in SQL Server 2008](http://msdn.microsoft.com/library/ms143179(v=sql.100)).
116+
> For more information on breaking changes, see [Breaking Changes to Database Engine Features in SQL Server 2017](../../database-engine/breaking-changes-to-database-engine-features-in-sql-server-2017.md), [Breaking Changes to Database Engine Features in SQL Server 2016](../../database-engine/breaking-changes-to-database-engine-features-in-sql-server-2016.md), [Breaking Changes to Database Engine Features in SQL Server 2014](http://msdn.microsoft.com/library/ms143179(v=sql.120)), [Breaking Changes to Database Engine Features in SQL Server 2012](http://msdn.microsoft.com/library/ms143179(v=sql.110)), and [Breaking Changes to Database Engine Features in SQL Server 2008](http://msdn.microsoft.com/library/ms143179(v=sql.100)).
117117
118118
## Best Practices
119119
For the recommended workflow for upgrading the compatibility level, see [Change the Database Compatibility Mode and Use the Query Store](../../database-engine/install-windows/change-the-database-compatibility-mode-and-use-the-query-store.md).
@@ -205,7 +205,7 @@ Fixes that were under trace flag 4199 in earlier versions of [!INCLUDE[ssNoVersi
205205
|The column properties `ROWGUIDCOL` and `IDENTITY` can be incorrectly named as a constraint. For example the statement `CREATE TABLE T (C1 int CONSTRAINT MyConstraint IDENTITY)` executes, but the constraint name is not preserved and is not accessible to the user.|The column properties `ROWGUIDCOL` and `IDENTITY` cannot be named as a constraint. Error 156 is returned.|Low|
206206
|Updating columns by using a two-way assignment such as `UPDATE T1 SET @v = column_name = <expression>` can produce unexpected results because the live value of the variable can be used in other clauses such as the `WHER`E and `ON` clause during statement execution instead of the statement starting value. This can cause the meanings of the predicates to change unpredictably on a per-row basis.<br /><br /> This behavior is applicable only when the compatibility level is set to 90.|Updating columns by using a two-way assignment produces expected results because only the statement starting value of the column is accessed during statement execution.|Low|
207207
|See example E in the Examples section below.|See example F in the Examples section below.|Low|
208-
|The ODBC function {fn CONVERT()} uses the default date format of the language. For some languages, the default format is YDM, which can result in conversion errors when CONVERT() is combined with other functions, such as {fn CURDATE()}, that expect a YMD format.|The ODBC function {fn CONVERT()} uses style 121 (a language-independent YMD format) when converting to the ODBC data types SQL_TIMESTAMP, SQL_DATE, SQL_TIME, SQLDATE, SQL_TYPE_TIME, and SQL_TYPE_TIMESTAMP.|Low|
208+
|The ODBC function {fn CONVERT()} uses the default date format of the language. For some languages, the default format is YDM, which can result in conversion errors when CONVERT() is combined with other functions, such as `{fn CURDATE()}`, that expect a YMD format.|The ODBC function `{fn CONVERT()}` uses style 121 (a language-independent YMD format) when converting to the ODBC data types SQL_TIMESTAMP, SQL_DATE, SQL_TIME, SQLDATE, SQL_TYPE_TIME, and SQL_TYPE_TIMESTAMP.|Low|
209209
|Datetime intrinsics such as DATEPART do not require string input values to be valid datetime literals. For example, `SELECT DATEPART (year, '2007/05-30')` compiles successfully.|Datetime intrinsics such as `DATEPART` require string input values to be valid datetime literals. Error 241 is returned when an invalid datetime literal is used.|Low|
210210

211211
## Reserved Keywords

0 commit comments

Comments
 (0)