TINYTEXT vs TEXT vs MEDIUMTEXT vs LONGTEXT in MYSQL

TEXT data type in MYSQL can let you persist long string data. Also media like image that encoded to character with base64.

The most different part between TINYTEXT, TEXT, MEDIUMTEXT and LONGTEXT is required storage size. TINYTEXT can hold 256 bytes, TEXT is 64KB, MEDIUMTEXT is 16M, LONGTEXT is 4G.

You can reference this capture in official manual:

10.5. Data Type Storage Requirements

 

留言

熱門文章