CHAR (13) fixed length, as long as the maximum length of not more than 13, the amount of storage space will not change, is always 13, the shortage is supplemented with empty characters.
PS: The required storage space is also a one-time allocation by the database, so at a faster speed than varchar, and there is no fragmentation, but because of the length of fixed also easier to create a waste of storage space, it is generally used to store fixed-length content. such as: MD5 hash value
varchar (13) is variable in length, and its storage space varies depending on the size of the storage content, without exceeding the maximum lengths.
Ps:varchar will use more bytes to store the length information, when it changes the length of the data before and after the database needs to do additional operations, depending on the storage engine, some use a split mechanism, some use paging mechanism, and inevitably produce fragments, the administrator can only import and export jobs to clear the fragmentation.
The difference between char and varchar in MySQL