I can’t find it in the DATETIME but I usually define it as DATETIME
with no precision specifier.
I noticed this when Hibernate automatic DDL update is run it alters the table to DATETIME(6)
I can’t find it in the DATETIME but I usually define it as DATETIME
with no precision specifier.
I noticed this when Hibernate automatic DDL update is run it alters the table to DATETIME(6)
2
Answers
It indicates the precision to which the milliseconds is stored.
DATETIME(6) means that the fractional milliseconds is stored upto 6 decimal places. For example, 1970-01-01 17:51:04.789463.
The number must range between 0 and 6.
This is documented on the page before the actual page you linked to in the ToC (emphasis mine):
DATETIME
is equivalent toDATETIME(0)
.DATETIME(6)
is not equivalent toDATETIME
norDATETIME(0)
.