If you are wondering about MySQL TEXT field size limit and what types of TEXT fields are available then this tutorial is for you. TEXT datatype are stored outside of the table and just having a pointer to the location of the actual storage. TEXT datatype could store much more information than VARCHAR or CHAR datatypes. This field type is used to when you need to store messages, emails, comments, formatted text and html code etc.
Now, we will talk about the size limit of TEXT datatype and what types of TEXT fields are available. There are four types of TEXT available in MySQL.
- TINYTEXT: TINYTEXT is a string datatype that can store up to 256 bytes (255 characters)
- TEXT: TEXT is a string datatype and can store up to 64 kilobytes (65,535 characters).
- MEDIUMTEXT: MEDIUMTEXT is also a string datatype and the maximum length is 16 megabytes (16,777,215 characters).
- LONGTEXT: LONGTEXT is a string datatype with the maximum length of 4 gigabytes (4,294,967,295 characters).