# Text Data Types
__*TEXT data type*__
__*TINYTEXT data type*__
__*MEDIUMTEXT data type*__
__*LONGTEXT data type*__

+ `TINYTEXT`: The maximum column length is 255 bytes
+ `TEXT`: The maximum column length is 65535 bytes
+ `MEDIUMTEXT` and `LONGTEXT`: 
  + Note: The maximum column length is likely be limited by total row length and which in turn is limited by system configuration parameters:
    + **txn-entry-size-limit** on TiDB
    + **raft-entry-max-size** on TiKV 

------------------------------------------------------------

The largest single Key-Value pair supported in TiDB is 6 MB by default.

If a pair exceeds this limit, you need to properly adjust the txn-entry-size-limit configuration value to relax the limit.

`txn-entry-size-limit`: The size limit of a single row of data in TiDB. Default value: 6291456 (in bytes). he maximum value of this configuration item does not exceed 125829120 (120 MB).

`raft-entry-max-size`: The hard limit on the maximum size of a single log. Default value: "8MB".

- TEXT type
  - Text string. M is the maximum column length (maximum number of characters), in the range 0 to 65535. When selecting a TEXT length, it should be determined from the size of the longest line and the character set used.
`TEXT[(M)] [CHARACTER SET charset_name] [COLLATE collation_name]` 

- TINYTEXT type
  - Similar to TEXT, except that the maximum column length is 255.
`TINYTEXT [CHARACTER SET charset_name] [COLLATE collation_name]` 

- MEDIUMTEXT type
  - Similar to TEXT, except that the maximum column length is 6291414.
`MEDIUMTEXT [CHARACTER SET charset_name] [COLLATE collation_name]` 

- LONGTEXT type
  - Similar to TEXT, except that the maximum column length is 6291414.
`LONGTEXT [CHARACTER SET charset_name] [COLLATE collation_name]` 