I know by default NULL = NULL is not true, so
if null = null select 1 else select 2
will give you 2
Then you can change that behaviour by
SET ANSI_NULLS OFF
and the result will be 1
My question is why after setting the ANSI_NULLS to OFF, the following SELECT still returns nothing?
select * from (select 'a', null) ta (c1, c2), (select 'b', null) tb (c1, c2)
where ta.c2 = tb.c2