1, Numerical type:
Tinyint:1 bytes
Smallint:2 bytes
Mediumint:3 bytes
Int:4 bytes
Bigint:8 bytes
Float:4 bytes
Double:8 bytes
Decimal (M,c): M represents the total length of this fixed-point floating point data, because decimal is a large number of list implementations, so the actual size of decimal is m+2, which is used by the list header.
Bit (m): The number of M table bits (bit) its value is between [1,64], so the value range of M is between [1,8].
2. Time Type:
Date--------4 bytes--------1000/01/01--------9999/12/31
DateTime--------8 bytes--------1000/01/01 00:00:00--------9999/12/31 23:59:59
Timestamp--------4 bytes--------1970010180001--------2038
Time--------3-byte--------( -838:59:59)--------(838:59:59)
Year--------1 bytes-------1901--------2155
3. String type
char (m), varchar (m) #char (m) is a list of one-byte table headers so it has a value of 0-->255 (2 of the 8-square) varchar (m) is the most so largest of the double-byte 65535 (2 16-square).
Tinyblob, BLOBs, Mediumblob, longblob#, respectively, are 1, 2, 3, 4-byte headers.
Tinytext, text, Mediumtext, longtext#, respectively, are 1, 2, 3, 4-byte headers.
varbinary (m), binary (m) #这个已经是无发无天了 can be seen as large as you want.
MySQL----Basic data types