Date 3 bytes, dates, format: 2014-09-18
Time 3 bytes, duration, format: 08:42:30
DateTime 8 Bytes, datetime, format: 2014-09-18 08:42:30
Timestamp 4 bytes, automatically stores the time the record was modified
Year 1 bytes, years
Tinyint 1 bytes, range ( -128~127)
SmallInt 2 bytes, range ( -32768~32767)
Mediumint 3 bytes, range ( -8388608~8388607)
int 4 byte, range ( -2147483648~2147483647)
BigInt 8 bytes, range (+-9.22*10 18-square)
Float (M, D) 4 bytes, single-precision floating-point, M total, D-Decimal
Double (M, D) 8 bytes, double-precision floating point, m total number, D decimal place
Decimal (M, d) decimal is a floating-point number stored as a string
char (n) fixed length, up to 255 characters
varchar (n) variable length, up to 65,535 characters
(The biggest difference between char and varchar is that char, regardless of the actual value, will occupy N-character space,
The varchar only occupies +1 of the space that the actual character should occupy, and the actual space is +1<=n. )
Tinytext variable length, up to 255 characters
Text variable length, up to 65,535 characters
Mediumtext variable length, up to 2 of 24 square-1 characters
Longtext variable length, up to 2 of 32 square-1 characters
*/index simple and easy to use indexing method.
Simple data type differences and realizations of MySQL