Binary Datatypes

Binary datatypes are some of the least compatible (and, fortunately, also some of the least used) datatypes. Unlike all the datatypes explained thus far, which have very specific uses, binary datatypes can contain any data, even binary information, such as graphic images, multimedia, and word processor documents (see Table D.4).

Table D.4. Binary Datatypes
DatatypeDescription
BINARYFixed-length binary data (maximum length varies from 255 bytes to 8,000 bytes, depending on implementation)
LONG RAWVariable-length binary data up to 2GB
RAW (called BINARY by some implementations)Fixed-length binary data up to 255 bytes
VARBINARYVariable-length binary data (maximum length varies from 255 bytes to 8,000 bytes, depending on implementation) ...

Get Sams Teach Yourself SQL in 10 Minutes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.