Usage for Binary Data Types

Binary data begins with the characters “0x” or “0X” and can include any combination of digits and the uppercase and lowercase letters A through F.

You can specify the column length in bytes, or use the default length of 1 byte. Each byte stores 2 hexadecimal digits. Even though the default length is 1 byte, it is recommended that you always specify an even number of characters for BINARY and VARBINARY column length. If you enter a value longer than the specified column length, SAP Sybase IQ truncates the entry to the specified length without warning or error.

Binary Data Type

Description

BINARY

Binary data of length length bytes. If length is omitted, the default is 1 byte. The maximum size allowed is 32767 bytes. Use the fixed-length binary type BINARY for data in which all entries are expected to be approximately equal in length. Because entries in BINARY columns are zero-padded to the column length length, they might require more storage space than entries in VARBINARY columns.

VARBINARY

Binary data up to a length of max-length bytes. If max-length is omitted, the default is 1 byte. The maximum size allowed is (32K – 1) bytes. Use the variable-length binary type VARBINARY for data that is expected to vary greatly in length.

UNIQUEIDENTIFIER

The UNIQUEIDENTIFIER data type is used for storage of UUID (also known as GUID) values.