# String Data Types

- [BLOB and TEXT Data Types](https://mariadb.com/docs/server/reference/data-types/string-data-types/blob-and-text-data-types.md): Overview of large object types. This page compares BLOB (binary) and TEXT (character) types, explaining their storage and usage differences.
- [BINARY](https://mariadb.com/docs/server/reference/data-types/string-data-types/binary.md): Fixed-length binary string type. This type stores a fixed number of bytes, padding with zero bytes if the data is shorter.
- [BLOB](https://mariadb.com/docs/server/reference/data-types/string-data-types/blob.md): Variable-length binary large object. BLOB columns can store binary data up to 65,535 bytes, suitable for images or other non-text files.
- [CHAR](https://mariadb.com/docs/server/reference/data-types/string-data-types/char.md): Fixed-length character string type. CHAR columns store strings of a specified length (0 to 255), padding with spaces if necessary.
- [CHARACTER](https://mariadb.com/docs/server/reference/data-types/string-data-types/character.md): Fixed-length character string type. CHARACTER columns store strings of a specified length (0 to 255), padding with spaces if necessary.
- [CHAR BYTE](https://mariadb.com/docs/server/reference/data-types/string-data-types/char-byte.md): Fixed-length binary string type. This type stores a fixed number of bytes, padding with zero bytes if the data is shorter.
- [CHAR VARYING](https://mariadb.com/docs/server/reference/data-types/string-data-types/char-varying.md)
- [CLOB](https://mariadb.com/docs/server/reference/data-types/string-data-types/clob.md): In Oracle mode, CLOB is an alias for the LONGTEXT data type used to store large text objects.
- [ENUM](https://mariadb.com/docs/server/reference/data-types/string-data-types/enum.md): Complete ENUM type reference: ENUM('v1','v2') syntax, CHARACTER SET/COLLATE options, NULL/empty string defaults, and numeric index sorting guidelines.
- [INET4](https://mariadb.com/docs/server/reference/data-types/string-data-types/inet4.md): IPv4 address data type. Stores IPv4 addresses as 4-byte binary strings for efficient storage and retrieval.
- [INET6](https://mariadb.com/docs/server/reference/data-types/string-data-types/inet6.md): IPv6 address data type. Stores IPv6 addresses as 16-byte binary strings, also supporting IPv4 addresses via mapping.
- [JSON Data Type](https://mariadb.com/docs/server/reference/data-types/string-data-types/json.md): Complete JSON Data Type data type guide for MariaDB. Complete reference for syntax, valid values, storage requirements, and range limits for production use.
- [LONG and LONG VARCHAR](https://mariadb.com/docs/server/reference/data-types/string-data-types/long-and-long-varchar.md): LONG and LONG VARCHAR are compatibility synonyms for the MEDIUMTEXT string data type.
- [LONG CHAR VARYING](https://mariadb.com/docs/server/reference/data-types/string-data-types/long-char-varying.md): LONG CHAR VARYING is a compatibility synonym for the MEDIUMTEXT string data type.
- [LONG CHARACTER VARYING](https://mariadb.com/docs/server/reference/data-types/string-data-types/long-character-varying.md): LONG CHARACTER VARYING is a compatibility synonym for the MEDIUMTEXT string data type.
- [LONG VARBINARY](https://mariadb.com/docs/server/reference/data-types/string-data-types/long-varbinary.md): LONG VARBINARY is a compatibility synonym for the MEDIUMBLOB binary data type.
- [LONG VARCHAR](https://mariadb.com/docs/server/reference/data-types/string-data-types/long-varchar.md): LONG VARCHAR is a compatibility synonym for the MEDIUMTEXT string data type.
- [LONG VARCHARACTER](https://mariadb.com/docs/server/reference/data-types/string-data-types/long-varcharacter.md): LONG VARCHARACTER is a compatibility synonym for the MEDIUMTEXT string data type.
- [LONGBLOB](https://mariadb.com/docs/server/reference/data-types/string-data-types/longblob.md): Very large binary object. A LONGBLOB column can store up to 4GB of binary data.
- [LONGTEXT](https://mariadb.com/docs/server/reference/data-types/string-data-types/longtext.md): Complete LONGTEXT type reference: 4GB (2^32-1) storage limit, CHARACTER SET/COLLATE syntax, max\_allowed\_packet constraints, and JSON/CLOB aliases.
- [MEDIUMBLOB](https://mariadb.com/docs/server/reference/data-types/string-data-types/mediumblob.md): Medium-sized binary object. A MEDIUMBLOB column can store up to 16MB of binary data.
- [MEDIUMTEXT](https://mariadb.com/docs/server/reference/data-types/string-data-types/mediumtext.md): Medium-sized character string. A MEDIUMTEXT column can store up to 16MB of text data.
- [NATIONAL CHAR](https://mariadb.com/docs/server/reference/data-types/string-data-types/national-char.md): NATIONAL CHAR is a synonym for the CHAR data type that uses the predefined utf8 character set.
- [NATIONAL CHAR VARYING](https://mariadb.com/docs/server/reference/data-types/string-data-types/national-char-varying.md): NATIONAL CHAR VARYING is a synonym for VARCHAR that uses the predefined utf8 character set.
- [NATIONAL CHARACTER VARYING](https://mariadb.com/docs/server/reference/data-types/string-data-types/national-character-varying.md): NATIONAL CHARACTER VARYING is a synonym for VARCHAR using the predefined utf8 character set.
- [NATIONAL CHARACTER](https://mariadb.com/docs/server/reference/data-types/string-data-types/national-character.md): NATIONAL CHARACTER is a synonym for the CHAR data type using the predefined utf8 character set.
- [NATIONAL VARCHAR](https://mariadb.com/docs/server/reference/data-types/string-data-types/national-varchar.md): NATIONAL VARCHAR is a synonym for the VARCHAR data type using the predefined utf8 character set.
- [NATIONAL VARCHARACTER](https://mariadb.com/docs/server/reference/data-types/string-data-types/national-varcharacter.md): NATIONAL VARCHARACTER is a synonym for VARCHAR using the predefined utf8 character set.
- [NCHAR](https://mariadb.com/docs/server/reference/data-types/string-data-types/nchar.md): NCHAR is a synonym for the fixed-length CHAR string data type using the utf8 character set.
- [NCHAR VARCHAR](https://mariadb.com/docs/server/reference/data-types/string-data-types/nchar-varchar.md): NCHAR VARCHAR is a synonym for the VARCHAR string data type using the utf8 character set.
- [NCHAR VARCHARACTER](https://mariadb.com/docs/server/reference/data-types/string-data-types/nchar-varcharacter.md): NCHAR VARCHARACTER is a synonym for VARCHAR using the utf8 character set.
- [NCHAR VARYING](https://mariadb.com/docs/server/reference/data-types/string-data-types/nchar-varying.md): NCHAR VARYING is a synonym for the VARCHAR string data type using the utf8 character set.
- [RAW](https://mariadb.com/docs/server/reference/data-types/string-data-types/raw.md): In Oracle mode, RAW is a variable-length binary data type synonymous with VARBINARY.
- [ROW](https://mariadb.com/docs/server/reference/data-types/string-data-types/row.md): ROW is a data type used in stored programs to store a complete row of data from a cursor or table.
- [SET Data Type](https://mariadb.com/docs/server/reference/data-types/string-data-types/set-data-type.md): String object with zero or more values from a predefined list. A SET column can store multiple values selected from a list of permitted strings.
- [TEXT](https://mariadb.com/docs/server/reference/data-types/string-data-types/text.md): Complete TEXT type reference: TEXT(M) syntax, 65,535 byte maximum, 2-byte length prefix, DEFAULT value support, and indexing constraints rules.
- [TINYBLOB](https://mariadb.com/docs/server/reference/data-types/string-data-types/tinyblob.md): Very small binary object. A TINYBLOB column can store up to 255 bytes of binary data.
- [TINYTEXT](https://mariadb.com/docs/server/reference/data-types/string-data-types/tinytext.md): Very small character string. A TINYTEXT column can store up to 255 characters.
- [UUID Data Type](https://mariadb.com/docs/server/reference/data-types/string-data-types/uuid-data-type.md): Official UUID data type reference: 128-bit storage optimization, CAST from CHAR/VARCHAR/BINARY types, RFC4122 string format, and UUIDv6/v7 support.
- [VARBINARY](https://mariadb.com/docs/server/reference/data-types/string-data-types/varbinary.md): Variable-length binary string type. VARBINARY columns store binary strings of variable length up to a specified maximum.
- [VARCHAR](https://mariadb.com/docs/server/reference/data-types/string-data-types/varchar.md): Complete VARCHAR reference: VARCHAR(M) syntax, length limits (0-65532 per row), CHARACTER SET/COLLATE options, indexing rules, and trailing spaces.
- [VARCHAR2](https://mariadb.com/docs/server/reference/data-types/string-data-types/varchar2.md): Variable-length character string type. VARCHAR2 columns store strings of variable length up to a specified maximum (up to 65,535).
- [VARCHARACTER](https://mariadb.com/docs/server/reference/data-types/string-data-types/varcharacter.md): Variable-length character string type. VARCHARACTER columns store strings of variable length up to a specified maximum (up to 65,535).
- [XMLTYPE](https://mariadb.com/docs/server/reference/data-types/string-data-types/xmltype.md)
- [Character Sets and Collations](https://mariadb.com/docs/server/reference/data-types/string-data-types/character-sets.md): Learn about character sets in MariaDB Server. This section details how different character sets and collations impact string storage, comparison, and sorting within your database.
- [Character Set and Collation Overview](https://mariadb.com/docs/server/reference/data-types/string-data-types/character-sets/character-set-and-collation-overview.md): Learn the core concepts of character sets and collations in MariaDB, including how they define string storage and sorting rules.
- [Setting Character Sets and Collations](https://mariadb.com/docs/server/reference/data-types/string-data-types/character-sets/setting-character-sets-and-collations.md): Complete Setting Character Sets and Collations data type guide for MariaDB. Complete reference for syntax, valid values, storage requirements, and range.
- [Supported Character Sets and Collations](https://mariadb.com/docs/server/reference/data-types/string-data-types/character-sets/supported-character-sets-and-collations.md): Complete character sets reference: SHOW CHARACTER SET command, information\_schema.CHARACTER\_SETS/COLLATIONS tables, NO PAD queries, and ci/cs flags.
- [Unicode](https://mariadb.com/docs/server/reference/data-types/string-data-types/character-sets/unicode.md): Explore MariaDB's support for Unicode, covering the differences between the utf8mb3 and utf8mb4 character sets for multi-byte storage.
- [Internationalization and Localization](https://mariadb.com/docs/server/reference/data-types/string-data-types/character-sets/internationalization-and-localization.md): Discover how MariaDB supports internationalization and localization, enabling databases to store and process data in multiple languages.
- [Coordinated Universal Time](https://mariadb.com/docs/server/reference/data-types/string-data-types/character-sets/internationalization-and-localization/coordinated-universal-time.md): Coordinated Universal Time (UTC) is the primary time standard by which the world regulates clocks and time, and is the internal storage format for MariaDB timestamp values.
- [Locales Plugin](https://mariadb.com/docs/server/reference/data-types/string-data-types/character-sets/internationalization-and-localization/locales-plugin.md): The LOCALES plugin enables the INFORMATION\_SCHEMA.LOCALES table and SHOW LOCALES statement, allowing users to view all locales compiled into the server.
- [Server Locale](https://mariadb.com/docs/server/reference/data-types/string-data-types/character-sets/internationalization-and-localization/server-locale.md): Server locale settings control the language for date and time functions via lc\_time\_names and the language for error messages via lc\_messages.
- [Setting the Language for Error Messages](https://mariadb.com/docs/server/reference/data-types/string-data-types/character-sets/internationalization-and-localization/setting-the-language-for-error-messages.md): Learn how to configure the lc\_messages and lc\_messages\_dir system variables to display server error messages in a supported local language.
- [Time Zones](https://mariadb.com/docs/server/reference/data-types/string-data-types/character-sets/internationalization-and-localization/time-zones.md): Complete Time Zones data type guide for MariaDB. Complete reference for syntax, valid values, storage requirements, and range limits for production use.


---

# 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.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.
