最重要的信息是你在原帖子中遗漏的信息:哪个数据库?既然你后来提到是MariaDB,那就给你:Since MariaDB 5.3, the TIME, DATETIME, and TIMESTAMP types, along with
the temporal functions, CAST and dynamic columns, have supported
microseconds. The datetime precision of a column can be specified when
creating the table with CREATE TABLE, for example:CREATE TABLE example( col_microsec DATETIME(6), col_millisec TIME(3) );Generally, the precision can be specified for any TIME,
DATETIME, or TIMESTAMP column, in parentheses, after the type name.
The datetime precision specifies number of digits after the decimal
dot and can be any integer number from 0 to 6. If no precision is
specified it is assumed to be 0, for backward compatibility reasons.
另一个例子:
^{pr2}$