ADATETIMEorTIMESTAMPvalue can include a trailing fractional seconds part in up to microseconds (6 digits) precision. In particular, any fractional part in a value inserted into aDATETIMEorTIMESTAMPcolumn is stored rather than discarded. With the fractional part included, the format for these values is'YYYY-MM-DD hh:mm:ss[.fraction]', the range forDATETIMEvalues is'1000-01-01 00:00:00.000000'to'9999-12-31 23:59:59.999999', and the range forTIMESTAMPvalues is'1970-01-01 00:00:01.000000'to'2038-01-19 03:14:07.999999'. The fractional part should always be separated from the rest of the time by a decimal point; no other fractional seconds delimiter is recognized.
MySQL has fractional seconds support for TIME, DATETIME, and TIMESTAMP values, with up to microseconds (6 digits) precision。
type_name(fsp), where type_name is TIME, DATETIME, or TIMESTAMP, and fsp is the fractional seconds precision. For example:fsp value, if given, must be in the range 0 to 6. A value of 0 signifies that there is no fractional part. If omitted, the default precision is 0. (This differs from the standard SQL default of 6, for compatibility with previous MySQL versions.)原文作者:;如有侵权,请联系管理员删除。