VARBINARYn
VARBINARY is a data type used in several relational database management systems to store variable-length binary data. It is intended for non-text binary content such as images, documents, encrypted values, or arbitrary byte streams. The literal usage is often VARBINARY(n), where n indicates the maximum number of bytes for the value. Some systems also support VARBINARY(MAX) or a similar “unbounded” form.
In SQL Server, VARBINARY(n) accepts n from 0 to 8000, with VARBINARY(MAX) available for values up to
PostgreSQL does not implement VARBINARY as a distinct type; instead, binary data is stored using the BYTEA
Storage and performance characteristics vary by system. VARBINARY values occupy space proportional to their actual length
Common use cases include storing binary large objects, file signatures, or encrypted values in a table column,