STRING_RTRUNCATION option [TSQL]

Function

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

Allowed values

ON, OFF

Default

OFF

Description

If the truncated characters consist only of spaces, no exception is raised. ON corresponds to SQL92 behavior. When STRING_TRUNCATION is 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.