The string type char and Varchar1, char (m) m are the maximum length of the string, and the length is any value between 0~255 bytes, occupying a fixed byte. 2, varchar (M) length is any value between 0~65535 bytes. The actual number of bytes is based on the actual character length plus 1, because there is a last terminator that occupies one byte. 3, char and varchar the last space in the string, char does not preserve space, varchar reserved space. 4. If the length of the insertion string exceeds the limit, you will be prompted not to insert the text type tinytext allowed length 0~255 bytes Storage value length + 2 bytes text allowed length 0~65535 bytes storage space is the length of the value + 2 bytes Mediumtext allow length 0~167772150 bytes storage to the length of the value + 3 bytes longtext allow length 0~4294967295 bytes storage to the length of the value + 4 bytes Enum type format: property name Enum (' Value 1 ', ' Value 2 ', ..., ' value n '); Values can be up to 65,535, spaces at the end of these values will be deleted directly from the system, and the characters inserted into the table can only be strings that are qualified in the enum. If a NOT null limit is added, inserting a null value is not allowed, if the insert value is not specified, the default insertion value is 1. If the not NULL limit is not specified, then no insertion value or null is inserted, and the inserted null is displayed. Set type format: property name Set (' Value 1 ', ' Value 2 ',..., ' value n '); The spaces at the end of these values will be deleted directly by the system, and the characters inserted into the table can only be a qualified string in the enum, which may be combined with multiple values, with multiple values separated by commas with a maximum of 64 values. such as insert: The Set Type value table is (' A ', ' B ', ' C ', ' d '), the insertion value is (' B ') and (' A,c,d '). Displays B and a,c,d.
MySQL String type