STRING_RTRUNCATION option [TSQL]

Function

Determines whether an error is raised when an INSERT or UPDATE truncates a CHAR, VARCHAR, BINARY, or VARBINARY string.

Allowed values

ON, OFF

Default

OFF

Description

If the truncated characters consist only of spaces, no exception is raised. The setting of ON corresponds to ANSI/ISO SQL/92 behavior. When set to OFF, the exception is not raised and the character string is silently truncated. If the option is ON and an error is raised, a ROLLBACK occurs.