Skip to content

Commit

Permalink
Add note about SELECT CAST(MeN AS CHAR) incompatibility (pingcap#13518)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiancai committed May 16, 2023
1 parent 60de52e commit 2d66dfa
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 @@ -172,7 +172,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,

Expand Down

0 comments on commit 2d66dfa

Please sign in to comment.