NOTE: I checked Understanding QUOTED_IDENTIFIER and it does not answer my question.
I got my DBAs to run an index I made on my Prod servers (they looked it over and
ANSI_NULLS ON makes any binary boolean expression with a null value evaluate to false. Using the following template:
declare @varA, @varB int
if
begin
print 'true'
end
else
begin
print 'false'
end
@varA: NULL; @varB: NULL; @varA = @varB evaluates to false
@varA: 1; @varB: NULL; @varA <> @varB evaluates to false
The proper way to test for null is to use is [not] NULL
@varA: NULL; @varA is NULL evaluates to true
@varA: 1; @varA is not NULL evaluates to true
QUOTED_IDENTIFER ON merely allows you to use double quotes to delimit identifiers (bad idea IMO, just user square brackets)
from tblA "a" -- ok when ON, not ok when OFF
from tblA [a] -- always ok