Truncate Trailing Zeros

The disable varbinary truncation configuration parameter controls whether trailing zeros are included at the end of varbinary and binary null data.

By default, disable varbinary truncation is off for the server.

When SAP ASE is set to truncate trailing zeros, tables you subsequently create store the varbinary data after truncating the trailing zeros. For example, if you create the test1 table with disable varbinary truncation set to 0:
create table test1(col1 varbinary(5))
Then insert some varbinary data with trailing zeros:
insert into test1 values(0x12345600)
SAP ASE truncates the zeros:
select * from test1
col1
------------
0x123456
However, if you drop and re-create table test1 and set disable varbinary truncation to 1 (on) and perform the same steps, SAP ASE does not truncate the zeros:
select * from test1
col1
------------
0x12345600

SAP ASE considers data with or without trailing zeros as equal for comparisons (that is, 0x1234 is the same as 0x123400).

Because SAP ASE stores data according to how disable varbinary truncation is currently set, tables may have a mix of data with or without trailing zeros, although the datatype does not change:
Trailing zeros are preserved in: