# BLOB and TEXT Data Types

## Description

A `BLOB` is a binary large object that can hold a variable amount of data. The four `BLOB` types are

* [TINYBLOB](https://mariadb.com/docs/server/reference/data-types/string-data-types/tinyblob),
* [BLOB](https://mariadb.com/docs/server/reference/data-types/string-data-types/blob),
* [MEDIUMBLOB](https://mariadb.com/docs/server/reference/data-types/string-data-types/mediumblob), and
* [LONGBLOB](https://mariadb.com/docs/server/reference/data-types/string-data-types/longblob).

These differ only in the maximum length of the values they can hold.

The `TEXT` types are

* [TINYTEXT](https://mariadb.com/docs/server/reference/data-types/string-data-types/tinytext),
* [TEXT](https://mariadb.com/docs/server/reference/data-types/string-data-types/text),
* [MEDIUMTEXT](https://mariadb.com/docs/server/reference/data-types/string-data-types/mediumtext), and
* [LONGTEXT](https://mariadb.com/docs/server/reference/data-types/string-data-types/longtext).
* [JSON](https://mariadb.com/docs/server/reference/data-types/string-data-types/json) (alias for LONGTEXT)

These correspond to the four `BLOB` types and have the same maximum lengths and [storage requirements](https://mariadb.com/docs/server/reference/data-types/data-type-storage-requirements).

`BLOB` and `TEXT` columns can have a `DEFAULT` value.

#### Note

It is possible to set a unique index on columns that use the `BLOB` or `TEXT` data types.

## See Also

* [Store a column as compressed](https://mariadb.com/docs/server/server-usage/tables/create-table#compressed)

<sub>*This page is licensed: GPLv2, originally from*</sub> [<sub>*fill\_help\_tables.sql*</sub>](https://github.com/MariaDB/server/blob/main/scripts/fill_help_tables.sql)

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/reference/data-types/string-data-types/blob-and-text-data-types.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
