The MySQL database constrains data by: Data type (m), where the number m represents a different meaning in different data types. The integer system has limited the range of values, tinyint takes up one byte, and int accounts for 4 bytes. So the M after the integer is not the length of the data represented, but the minimum length (length is the number of characters) displayed when the data is displayed.
tinyint (1) Here 1 represents the shortest display of a character. tinyint (2) Here 2 means the shortest display of two characters, but here the light set M is meaningless, you also need to specify when the data is less than the length of M with what to fill, such as Zerofill (indicates that there is 0 padding). Set tinyint (2) Zerofill you insert 1 o'clock he will show 01. Set tinyint (4) Zerofill you insert 1 o'clock he will show 0001.
PHP tinyint (1) Why is it possible to insert the value of 99?