Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » SQL Data Types » Binary data types

UNIQUEIDENTIFIER data type Next Page

VARBINARY data type

The VARBINARY data type is used to store binary data of a specified maximum length (in bytes).


VARBINARY [ ( max-length ) ]


max-length    The maximum length of the value, in bytes. The length must be in the range 1 to 32767. If the length is not specified, then it is 1.


During comparisons, VARBINARY values are compared exactly byte for byte. This differs from the CHAR data type, where values are compared using the collation sequence of the database. If one binary string is a prefix of the other, the shorter string is considered to be less than the longer string.

Unlike CHAR values, VARBINARY values are not transformed during character set conversion.

VARBINARY can also be specified as BINARY VARYING. Regardless of which syntax is used, the data type is described as VARBINARY.

See also
Standards and compatibility