Syntax\n------\n\nBLOB[(M)]\n\nDescription\n-----------\n\nIf you are handling large binary data that exceeds the max_allowed_packet limit, you can stream the data in chunks using specialized API functions like mysql_stmt_send_long_data() or setBinaryStream(). See Handling Large Data via APIs for more details.\n\nA BLOB column with a maximum length of 65,535 (2¹⁶ - 1) bytes. Each BLOB value is stored using a two-byte length prefix that indicates the number of bytes in the value.\n\nAn optional length M can be given for this type. If this is done, MariaDB creates the column as the smallest BLOB type large enough to hold values _M_ bytes long.\n\nBLOB values can also be used to store dynamic columns.\n\nBLOB and TEXT columns can both be assigned a DEFAULT value.\n\nIndexing\n\nOn a column that uses the BLOB data type, setting a unique index is now possible.\n\nNote\n\nIn previous releases, setting a unique index on a column that uses the BLOB data type was not possible. Index would only guarantee the uniqueness of a fixed number of characters.\n\nOracle Mode\n\nIn Oracle mode, BLOB is a synonym for LONGBLOB.\n\nExamples\n--------\n\nCREATE TABLE blob_example (\n   description VARCHAR(20),\n   example BLOB\n) DEFAULT CHARSET=latin1; -- One byte per char makes the examples clearer\n\nURL: https://mariadb.com/docs/server/reference/data-types/string-data-types/blob