MySQL data type:
Integer floating-point type
1, bool, Boolean equivalent to tinyint (1). where true equals 1,false equals 0.
2, tinyint (m), smallint (m) and so on by default is signed signed, you can define the unsigned unsigned.
3, Decimal (m,d) where M represents the total length Max 65,d represents the number of digits after the decimal point Max 30.
Time Type:
1. Date range is to ‘1000-01-01‘
‘9999-12-31‘,格式为‘YYYY-MM-DD‘,datetime(fsp) 范围‘1000-01-01 00:00:00.000000‘
to ‘9999-12-31 23:59:59.999999‘,格式是
‘YYYY-MM-DD HH:MM:SS[.fsp]‘,其中fsp值的范围是0-6.初始化或更新时可以设置default或on update 为CURRENT_TIMESTAMP。
2, the timestamp (FSP) range is ‘1970-01-01 00:00:01.000000‘
UTC to ‘2038-01-19 03:14:07.999999‘
UTC. You can set default or on update to Current_timestamp when initializing or updating.
3, Time (FSP) range is ‘-838:59:59.000000‘
to ‘838:59:59.000000‘
.
Character type
1, char (m) where m default is 1 range is 0-255.
2, varchar (m) where the M range is generally 0-65535, if the character set is UTF8 (three bytes one character) then the maximum is 21844.mysql generally take 1-2 bytes to store the character length, if 1 bytes, then the maximum length is 255 bytes.
3, binary (m) binary type, similar to char (M).
4, varbinary (m) binary type, similar to varchar (m).
5. Blob (M) is similar to varchar, with a maximum of 65535 bytes. There are Mediumblob and Longblob.
6, Text (M) Ibid. and a longtext.
7. Enum enumeration can have up to 65,535 elements.
8. A set set can have up to 64 different elements.
MySQL Document summary cont. 3