binary, varbinary, and image

When you enter binary, varbinary, or image data as literals, you must precede the data with “0x”. For example, to enter “FF”, type “0xFF”. Do not, however, enclose data beginning with “0x” with quotation marks.

Binary literals can be of any length, regardless of the logical page size of the database. If the length of the literal is less than 16KB (16384 bytes), SAP ASE treats the literal as varbinary data. If the length of the literal is greater than 16KB, SAP ASE treats it as image data.

When you insert binary data into a column for which the specified length is less than the length of the data, the entry is truncated without warning.

A length of 10 for a binary or varbinary column means 10 bytes, each storing 2 hexadecimal digits.

When you create a default on a binary or varbinary column, precede it with “0x”.

See, System and User-Defined Datatypes in the Reference Manual: Building Blocks for the different behaviors of binary datatypes and image datatypes and for information about trailing zeros in hexadecimal values.