The datetime decimal part of MySQL is subtle, isn't it?

< H1 > question < / H1 >

the data table needs a column to keep the current time, and then it needs to be accurate to milliseconds , and then search it. It is found that datetime can take decimals. According to this blog

TIMESTAMP(3) DATETIME(3)3
TIMESTAMP(6) DATETIME(6)6

later looked up official document , and wrote

.
MySQL 5.6.4 and up expands fractional seconds support for TIME, DATETIME, and TIMESTAMP values, with up to microseconds (6 digits) precision:

says that it is subtle . In fact, at first I thought the blog was right, but I saw that in the PHP document, the DateTime format has a parameter f

.
f
Number of microseconds, as a fraction of a second.

what I want is subtlety. I think PHP is based on common standards

. < H1 > conclusion < / H1 >

in the end, we have to read the official documents. Domestic blogs are estimated to be copied back and forth

.
Mar.22,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e3939f-43493.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e3939f-43493.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?