MEDIUMTEXT
Medium-sized character string. A MEDIUMTEXT column can store up to 16MB of text data.
Syntax
MEDIUMTEXT [CHARACTER SET charset_name] [COLLATE collation_name]Description
A TEXT column with a maximum length of 16,777,215 (2²⁴ - 1) characters. The effective maximum length is less if the value contains multi-byte characters. Each MEDIUMTEXT value is stored using
a three-byte length prefix that indicates the number of bytes in the value.
SYNONYMS
The following are synonyms for MEDIUMTEXT:
LONG
LONG CHAR VARYING
LONG CHARACTER VARYING
LONG VARCHAR
LONG VARCHARACTER
EXAMPLES
MEDIUMTEXT
Example of MEDIUMTEXT:
Data Too Long
When SQL_MODE is strict (the default) a value is considered "too long" when its length exceeds the size of the data type, and an error is generated.
Example of data too long behavior for MEDIUMTEXT:
See Also
This page is licensed: GPLv2, originally from fill_help_tables.sql
Last updated
Was this helpful?

