Numeric type
tinyint Storage Range: 128 to 127 or 0 to 255 tinyint (1) smallint storage range: 32768 to 32767 or 0 to 65535 smallint (3) Mediumint Storage Range:- 8388608 to 8388607 or 0 to 16777215 mediumint (5) int Storage Range:- 2147483648 to 2147483647 or 0 to 4294967295 int (Ten) bigint storage range:- 9223372036854775808 to 9223372036854775807 or 0 to 18446744073709551615 bigint (Ten) float Minimum non 0 value: ±1.175494351e – 38, same as double suitable for high precision applications float (3,1) double min non 0 value:±2.2250738585072014e - 308 double (10,5) decimal value range variable, since the display size and the number of decimal places in parentheses, Suitable for applications where accuracy is not high but the accuracy requirement is very high decimal (10,2)
Character type
Char supports fixed-length strings with a maximum length of 255 characters char (+) varchar supports variable-length strings, a maximum length of 65,535 characters varchar (tinytext) supports variable-length strings, and a maximum length of 255 Characters tinytexttext support variable-length strings, with a maximum length of 65,535 characters Textblob mediumtext supports variable-length strings with a maximum length of 16,777,215 characters Mediumtextmediumblob LONGTEXT supports variable-length strings, with a maximum length of 4,294,967,295 characters Longtextlongblobenum enumeration type, which can store up to 65,535 members, often used for values that are limited and fixed enmu ("male", "female") set collection type, can store up to 64 member set ("Value1", "value2", ...)
Date type
Date YYYY-MM-DD format represents date value in datetime HH:MM:SS format represents a time value TIMEDATETIMEYYYY-MM-DD HH:MM:SS format represents a datetime value DATETIMETIMESTAMPYYYYMM The DDHHMMSS format represents the timestamp value timestampyear the year value in YYYY format
Data types for MySQL