STRING_RTRUNCATION Option [TSQL]

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

Allowed Values

ON, OFF

Default

ON

Description

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

This option was OFF by default prior to Sybase IQ 15.0. It can safely be set to OFF for backward compatibility. However, the ON setting is preferable to identify statements where truncation may cause data loss.