Storage Size

Familiarize yourself with the storage size of binary data.

Storage size of binary data

Data type

Column definition

Input data

Storage

VARBINARY

width of (32K – 1) bytes

(32K – 1) bytes binary

(32K – 1) bytes

VARBINARY

width of (32K– 1) bytes

(64K – 2) bytes ASCII

(32K – 1) bytes

BINARY

width of (32K – 1) bytes

(32K – 1) bytes binary

(32K – 1) bytes

BINARY

width of (32K – 1) bytes

(64K – 2) bytes ASCII

(32K – 1) bytes

The exact form in which you enter a particular value depends on the platform you are using. Therefore, calculations involving binary data might produce different results on different machines.

For platform-independent conversions between hexadecimal strings and integers, use the INTTOHEX and HEXTOINT functions rather than the platform-specific CONVERT function.

Related reference
Data Type Conversion Functions
Data Type Conversions