Skip to content

Commit

Permalink
update precision of DATETIME and TIMESTAMP values (#13969) (#13970)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot committed May 16, 2023
1 parent e2b18a0 commit 4da92b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data-type-date-and-time.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ CREATE TABLE t1 (

## 时间值的小数部分

`DATETIME``TIMESTAMP` 值最多可以有 6 位小数,精确到毫秒。如果包含小数部分,值的格式为 `YYYY-MM-DD HH:MM:SS[.fraction]`,小数部分的范围为 `000000``999999`。必须使用小数点分隔小数部分与其他部分。
`DATETIME``TIMESTAMP` 值最多可以有 6 位小数,精确到微秒。如果包含小数部分,值的格式为 `YYYY-MM-DD HH:MM:SS[.fraction]`,小数部分的范围为 `000000``999999`。必须使用小数点分隔小数部分与其他部分。

+ 使用 `type_name(fsp)` 可以定义精确到小数的列,其中 `type_name` 可以是`TIME``DATETIME``TIMESTAMP`。例如:

Expand Down

0 comments on commit 4da92b9

Please sign in to comment.