Топ-100
 
RDBMS Type: MySQL
Topic

DATETIME[(fsp)]

A date and time combination. The supported range is '1000-01-01
00:00:00.000000' to '9999-12-31 23:59:59.999999'. MySQL displays
DATETIME values in 'YYYY-MM-DD hh:mm:ss[.fraction]' format, but permits
assignment of values to DATETIME columns using either strings or
numbers.

An optional fsp value in the range from 0 to 6 may be given to specify
fractional seconds precision. A value of 0 signifies that there is no
fractional part. If omitted, the default precision is 0.

Automatic initialization and updating to the current date and time for
DATETIME columns can be specified using DEFAULT and ON UPDATE column
definition clauses, as described in
https://dev.mysql.com/doc/refman/8.0/en/timestamp-initialization.html.

URL: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-type-syntax.html

Example