From de1d0f213437cd13e9d292847720d1c324686421 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Tue, 16 May 2023 14:41:18 +0800 Subject: [PATCH] update precision of DATETIME and TIMESTAMP values (#13565) (#13567) --- data-type-date-and-time.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data-type-date-and-time.md b/data-type-date-and-time.md index 4a02f0e12fb9..fa0216ed64dc 100644 --- a/data-type-date-and-time.md +++ b/data-type-date-and-time.md @@ -171,7 +171,7 @@ CREATE TABLE t1 ( ## Decimal part of time value -`DATETIME` and `TIMESTAMP` values can contain a fractional part of up to 6 digits which is accurate to milliseconds. In any column of `DATETIME` or `TIMESTAMP` types, a fractional part is stored instead of being discarded. With a fractional part, the value is in the format of 'YYYY-MM-DD HH:MM:SS[.fraction]', and the fraction ranges from 000000 to 999999. A decimal point must be used to separate the fraction from the rest. +`DATETIME` and `TIMESTAMP` values can contain a fractional part of up to 6 digits which is accurate to microseconds. In any column of `DATETIME` or `TIMESTAMP` types, a fractional part is stored instead of being discarded. With a fractional part, the value is in the format of 'YYYY-MM-DD HH:MM:SS[.fraction]', and the fraction ranges from 000000 to 999999. A decimal point must be used to separate the fraction from the rest. + Use `type_name(fsp)` to define a column that supports fractional precision, where `type_name` can be `TIME`, `DATETIME` or `TIMESTAMP`. For example,