次の方法で共有


AssignmentDiag Property

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションは修正することを検討してください。

The AssignmentDiag property enables SQL-92 standard behavior for NULL in aggregate, data truncation, divide-by-zero, and arithmetic overflow errors.

構文

object
.AssignmentDiag [=value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list
  • value
    TRUE or FALSE

Data Type

Boolean

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetAssignmentDiag(LPBOOL pRetVal);
HRESULT SetAssignmentDiag(BOOL NewValue);

解説

If TRUE, SQL-92 standard behavior is enabled. If NULL is involved in an aggregate, data is truncated on an INSERT or UPDATE statement execution, or a divide-by-zero or arithmetic overflow occurs, these events follow:

  • The statement is stopped.
  • Any transactions are rolled back.
  • An error is returned to the client.

If FALSE, SQL-92 behavior is disabled. If NULL is returned for an affected column or data is truncated on an INSERT or UPDATE, these events follow:

  • Transactions are not rolled back.
  • The client receives either an error, success with information, or a success return code.

Applies To:

DBOption Object

参照

その他の技術情報

SET ANSI_WARNINGS (Transact-SQL)

ヘルプおよび情報

SQL Server 2005 の参考資料の入手