The treatment of trailing zeros in binary data differs between SAP Sybase IQ, SQL Anywhere, and Adaptive Server.
Data type |
SAP Sybase IQ |
SQL Anywhere |
Adaptive Server |
---|---|---|---|
BINARY NOT NULL |
Padded |
Not padded |
Padded |
BINARY NULL |
Padded |
Not padded |
Not padded |
VARBINARY NOT NULL |
Truncated, not padded |
Truncated, not padded |
Truncated, not padded |
VARBINARY NULL |
Truncated, not padded |
Truncated, not padded |
Truncated, not padded |
Adaptive Server, SQL Anywhere, and SAP Sybase IQ all support the STRING_RTRUNCATION database option, which affects error message reporting when an INSERT or UPDATE string is truncated. For Transact-SQL compatible string comparisons, set the STRING_RTRUNCATION option to the same value in both databases.
You can also set the STRING_RTRUNCATION option ON when loading data into a table, to alert you that the data is too large to load into the field. The default value is ON.
Bit operations on binary type data are not supported by Adaptive Server. SQL Anywhere only supports bit operations against the first four bytes of binary type data. SAP Sybase IQ supports bit operations against the first eight bytes of binary type data.