AhDung

/*追求代码质量的野生码农*/

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
  107 随笔 :: 0 文章 :: 457 评论 :: 34万 阅读

尝试环境:.netfx2.0~4.8、.net core 3.1~5.0、SQL Server 2008 R2 SP1,发现.net版本之间及数据兼容模式如何设置没差异。

FlagNameValueDescription
1 DISABLE_DEF_CNST_CHK   Controls interim or deferred constraint checking.
2 IMPLICIT_TRANSACTIONS   For dblib network library connections, controls whether a transaction is started implicitly when a statement is executed. The IMPLICIT_TRANSACTIONS setting has no effect on ODBC or OLEDB connections.
4 CURSOR_CLOSE_ON_COMMIT   Controls behavior of cursors after a commit operation has been performed.
8 ANSI_WARNINGS ON Controls truncation and NULL in aggregate warnings.
16 ANSI_PADDING ON Controls padding of fixed-length variables.
32 ANSI_NULLS ON Controls NULL handling when using equality operators.
64 ARITHABORT   Terminates a query when an overflow or divide-by-zero error occurs during query execution.
128 ARITHIGNORE   Returns NULL when an overflow or divide-by-zero error occurs during a query.
256 QUOTED_IDENTIFIER ON Differentiates between single and double quotation marks when evaluating an expression.
512 NOCOUNT   Turns off the message returned at the end of each statement that states how many rows were affected.
1024 ANSI_NULL_DFLT_ON ON Alters the session's behavior to use ANSI compatibility for nullability. New columns defined without explicit nullability are defined to allow nulls.
2048 ANSI_NULL_DFLT_OFF   Alters the session's behavior not to use ANSI compatibility for nullability. New columns defined without explicit nullability do not allow nulls.
4096 CONCAT_NULL_YIELDS_NULL ON Returns NULL when concatenating a NULL value with a string.
8192 NUMERIC_ROUNDABORT   Generates an error when a loss of precision occurs in an expression.
16384 XACT_ABORT   Rolls back a transaction if a Transact-SQL statement raises a run-time error.

选项参考:https://docs.microsoft.com/en-us/sql/t-sql/statements/set-statements-transact-sql

posted on   ahdung  阅读(144)  评论(0编辑  收藏  举报
编辑推荐:
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
· C++代码改造为UTF-8编码问题的总结
阅读排行:
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· 清华大学推出第四讲使用 DeepSeek + DeepResearch 让科研像聊天一样简单!
· 实操Deepseek接入个人知识库
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
历史上的今天:
2015-01-04 【SQL】SQL2012离线帮助文档安装不上的处理手记
点击右上角即可分享
微信分享提示