rspec/rules/S4154/tsql/rule.adoc

20 lines
633 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
Changing the configuration of database options ``++ANSI_NULLS++``, ``++ANSI_PADDING++`` and ``++CONCAT_NULL_YIELDS_NULL++`` is deprecated. The future versions of SQL Server will only support the ``++ON++`` value, and the ``++SET++`` statement for those options to ``++OFF++`` will eventually generate an error.
== Noncompliant Code Example
----
SET ANSI_NULLS OFF -- Noncompliant
SELECT column1 FROM table1 WHERE id = NULL
SET ANSI_PADDING OFF -- Noncompliant
SET CONCAT_NULL_YIELDS_NULL ON -- Noncompliant
SET ANSI_PADDING ON -- "ON" is ignored
----
== Compliant Solution
----
SELECT column1 FROM table1 WHERE id IS NULL
----