MySQL in text Type Description

Type in the text field descriptions MySQL
Field Type Store the number of bytes
TINYTEXT 256
TEXT 65535
MEDIUMTEXT 16777215
LONGTEXT 4294967295










varchar, and text type of comparison:
varchar in MySQL maximum number of bytes stored as 65535, in MySQL, a character takes 3 bytes, type varchar requires 1 ~ 2 bytes of storage field length. Therefore, type varchar maximum number of characters stored (65535-2) / 3 = 21,844 characters.
text and the number of bytes of storage varchar same maximum number of bytes, so it can be stored 21,844 characters.

Guess you like

Origin www.cnblogs.com/shaoshuai95928/p/mysql.html