Floating-Point Types (Approximate Value) - FLOAT, DOUBLE
float 存储 4bytes
float(7,4)就会看到这样:-999.9999的显示。MySQL进行舍入时存储的值,所以如果你插入999.00009成浮(7,4)柱,近似的结果是999.0001
If M and D are omitted, values are stored to the limits permitted by the hardware.
double 存储 8bytes
时间和日期
DATE:日期 'YYYY-MM-DD'. The supported range is '1000-01-01' to '9999-12-31'
DATETIME:日期时间组合 'YYYY-MM-DD HH:MM:SS' The supported range is '1000-01-01 00:00:00' to'9999-12-31 23:59:59'.
TIMESTAMP:时间戳 '1970-01-01 00:00:01.000000' UTC to '2038-01-19 03:14:07.999999' 注意:不能等于'1970-01-01 00:00:00'会归零;
TIME:时间 '-838:59:59.000000' to '838:59:59.000000' 注意:'11:12' means '11:12:00', not '00:11:12' ; '1112' and 1112 as meaning '11:12:00;默认情况下,超出范围的值会被自动转换成接近的值,eg:'-850:00:00' and '850:00:00' are converted to '-838:59:59' and '838:59:59';无效的的时间值会被转换成'00:00:00'
YEAR: range 1901 to 2155, or 0000 注意:YEAR(4) and YEAR(2)不同之处在于显示不同;eg:70 (1970 or 2070) or 69 (2069).
字符串
CHAR:0 to 255 定长,存储时用空格补齐;读取时删掉后面的空格,PAD_CHAR_TO_FULL_LENGTH sql模式开启