ANSI_NULLS的数据库默认值 [英] Database default for ANSI_NULLS

查看:446
本文介绍了ANSI_NULLS的数据库默认值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SQL数据库具有默认值ANSI_NULLS off的选项。


建议设置为开启吗?


解决方案

来自: https://docs.microsoft.com/en-us/sql/t-sql/ statements / set-ansi-nulls-transact-sql?view = sql-server-2017


在SQL Server的未来版本中,ANSI_NULLS将为ON,并且任何应用程序都是将
选项显式设置为OFF将生成错误。避免在新的开发工作中使用此功能,并计划修改当前使用此功能的应用程序。


我会避免在没有正当理由的情况下更改它并进行全面测试,因为它可以改变事物的行为并导致错误,因为事情预期它是某种方式。


这就是说,如果你从头开始设置它为ON。


希望有所帮助!




SQL database has option with defaults ANSI_NULLS off.

is it recommend to set to on ?

解决方案

From :https://docs.microsoft.com/en-us/sql/t-sql/statements/set-ansi-nulls-transact-sql?view=sql-server-2017

In a future version of SQL Server, ANSI_NULLS will be ON and any applications that explicitly set the option to OFF will generate an error. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

I would avoid changing it without a valid reason and fully testing as it can change the behavior of things and cause errors since things expect it to be a certain way.

That said, if you are starting from scratch set it to ON.

Hope it helps!


这篇关于ANSI_NULLS的数据库默认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆