So while I understand what it's for and why I want it on. I have a customer database that has some how been created with it off. There seems to be lots of places to change this value, on the server, on the db in SSMS options
My confusion is how do I know if objects have been created with it on or off.
When I right click on an SP or FN and click Modify it is always adding in SET ANSI_NULLS OFF when it should be SET ANSI_NULLS_ON which leads me to believe it's been stored as OFF and not ON
What I've not been able to make happen is if I drop and create an object with SET ANSI_NULLS ON when I use the modify option it still says OFF.
I'm sure I'm just not understanding something.
I did find
SELECT OBJ.type_desc AS ObjectType, OBJ.name AS ObjectName
FROM sys.objects AS OBJ
INNER JOIN sys.sql_modules AS CODE
ON CODE.object_id = OBJ.object_id
WHERE CODE.uses_ansi_nulls = 0
ORDER BY ObjectType, ObjectName
Which is telling me which objects have ANSI_NULLS off but everything I do to turn the on seems to not work.