Binary data begins with the characters “0x” and can include any combination of digits and the uppercase and lowercase letters A through F.
Use n to specify the column length in bytes, or use the default length of 1 byte. Each byte stores 2 binary digits. If you enter a value longer than n, Adaptive Server truncates the entry to the specified length without warning or error.
Use the fixed-length binary type, binary(n), for data in which all entries are expected to be approximately equal in length.
Use the variable-length binary type, varbinary(n), for data that is expected to vary greatly in length.
Because entries in binary columns are zero-padded to the column length (n), they may require more storage space than those in varbinary columns, but they are accessed somewhat faster.
If you do not use n to specify the length:
The default length is 1 byte for columns created with create table, alter table, and variables created with declare.
The default length is 30 bytes for values created with the convert function.