Skip to content

Commit

Permalink
align #7393
Browse files Browse the repository at this point in the history
  • Loading branch information
TomShawn committed Feb 8, 2022
1 parent 06a9b79 commit 0692dfc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions data-type-date-and-time.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Invalid `DATE`, `DATETIME`, `TIMESTAMP` values are automatically converted to th

### `DATE` type

`DATE` only contains date-portion and no time-portion, displayed in `YYYY-MM-DD` format. The supported range is '1000-01-01' to '9999-12-31':
`DATE` only contains date-portion and no time-portion, displayed in `YYYY-MM-DD` format. The supported range is '0000-01-01' to '9999-12-31':

```sql
DATE
Expand All @@ -102,7 +102,7 @@ TIME[(fsp)]

### `DATETIME` type

`DATETIME` contains both date-portion and time-portion. Valid values range from '1000-01-01 00:00:00.000000' to '9999-12-31 23:59:59.999999'.
`DATETIME` contains both date-portion and time-portion. Valid values range from '0000-01-01 00:00:00.000000' to '9999-12-31 23:59:59.999999'.

TiDB displays `DATETIME` values in `YYYY-MM-DD HH:MM:SS[.fraction]` format, but permits assignment of values to `DATETIME` columns using either strings or numbers. An optional fsp value in the range from 0 to 6 may be given to specify fractional seconds precision. If omitted, the default precision is 0:

Expand Down
2 changes: 1 addition & 1 deletion data-type-numeric.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ The meaning of the fields:

### `DECIMAL` type

`DECIMAL` and its alias `NUMERIC` stores a packed "exact" fixed-point number. M is the total number of digits (the precision), and D is the number of digits after the decimal point (the scale). The decimal point and (for negative numbers) the - sign are not counted in M. If D is 0, values have no decimal point or fractional part. The maximum number of digits (M) for DECIMAL is 65. The maximum number of supported decimals (D) is 30. If D is omitted, the default is 0. If M is omitted, the default is 10.
`DECIMAL` and its alias `NUMERIC` stores a packed "exact" fixed-point number. M is the total number of digits (the precision, the number of integer digits + the number of decimal digits), and D is the number of digits after the decimal point (the scale). The decimal point and (for negative numbers) the - sign are not counted in M. If D is 0, values have no decimal point or fractional part. The maximum number of digits (M) for DECIMAL is 65. The maximum number of supported decimals (D) is 30. If D is omitted, the default is 0. If M is omitted, the default is 10.

```sql
DECIMAL[(M[,D])] [UNSIGNED] [ZEROFILL]
Expand Down

0 comments on commit 0692dfc

Please sign in to comment.