Different Text Column Data Types and Maximum Storage Sizes in MySQL

The actual text column type is classified in to four:

  1. TINYTEXT
  2. TEXT
  3. MEDIUMTEXT
  4. LONG TEXT

The maximum length that you can store in a column of each data type is given below.

      Type | Maximum length
-----------+-------------------------------------
  TINYTEXT |           255 (2 8−1) bytes
      TEXT |        65,535 (216−1) bytes = 64 KiB
MEDIUMTEXT |    16,777,215 (224−1) bytes = 16 MiB
  LONGTEXT | 4,294,967,295 (232−1) bytes =  4 GiB

Note: The number of characters that can be stored in your column will depend on the character encoding.

Comments

Popular posts from this blog

About 12 Alwars

Post thumbnails from external URLs don’t appear in Blogger. How to resolve?

What is the unicode character for the close symbol?