Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update precision of DATETIME and TIMESTAMP values #13969

Merged
merged 1 commit into from
May 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data-type-date-and-time.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,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