CREATE TABLE t1 (t TIME(3), dt DATETIME(6));
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.)
Functions that take temporal arguments accept values with fractional seconds.
Return values from temporal functions include fractional seconds as appropriate. For example,
NOW() with no
argument returns the current date and time with no fractional part, but takes an optional argument from
0 to 6 to specify that the return value includes a fractional seconds part of that many digits.
Syntax for temporal literals produces temporal values:
TIME ', and
TIMESTAMP ', and the ODBC-syntax equivalents. The resulting
value includes a trailing fractional seconds part if specified. Previously, the temporal type keyword
was ignored and these constructs produced the string value. See Standard
SQL and ODBC Date and Time Literals