Binary Data v11

The following table shows data types that allow the storage of binary strings:

NameStorage SizeDescription
BINARYThe length of the binary string.Fixed-length binary string, with a length between 1 and 8300.
BLOBThe actual binary string plus 1 byte if the binary string is less than 127 bytes, or 4 bytes if the binary string is 127 bytes or greater.Variable-length binary string, with a maximum size of 1 GB.
VARBINARYThe length of the binary stringVariable-length binary string, with a length between 1 and 8300.

A binary string is a sequence of octets (or bytes). Binary strings are distinguished from characters strings by two characteristics: First, binary strings specifically allow storing octets of value zero and other "non-printable" octets (defined as octets outside the range 32 to 126). Second, operations on binary strings process the actual bytes, whereas the encoding and processing of character strings depends on locale settings.