共用方式為


AssignmentDiag Property

未來的 Microsoft SQL Server 版本將移除這項功能。請避免在新的開發工作中使用這項功能,並規劃修改目前使用這項功能的應用程式。

The AssignmentDiag property enables ISO 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, ISO 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, ISO 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: