Skip to content

Commit

Permalink
Update data-type-numeric.md (#7837) (#9959)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Jun 22, 2022
1 parent 72c2a12 commit b6009d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data-type-numeric.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ TiDB 支持 MySQL 所有的定点类型,包括 `DECIMAL`、`NUMERIC`,完整

| 语法元素 | 说明 |
| -------- | ------------------------------- |
| M | 数值总位数 |
| M | 小数总位数 |
| D | 小数点后位数 |
| UNSIGNED | 无符号数,如果不加这个标识,则为有符号数 |
| ZEROFILL | 补零标识,如果有这个标识,TiDB 会自动给类型增加 UNSIGNED 标识 |
Expand All @@ -189,7 +189,7 @@ TiDB 支持 MySQL 所有的定点类型,包括 `DECIMAL`、`NUMERIC`,完整

#### `DECIMAL` 类型

定点数,别名为 `NUMERIC`。M 是数值位数(精度)的总数(整数位数 + 小数位数),D 是小数点(标度)后面的位数。小数点和 `-`(负数)符号不包括在 M 中。如果 D 是 0,则值没有小数点或分数部分。如果 D 被省略,默认是 0。如果 M 被省略,默认是 10。
定点数,别名为 `NUMERIC`。M 是小数位数(精度)的总数,D 是小数点(标度)后面的位数。小数点和 `-`(负数)符号不包括在 M 中。如果 D 是 0,则值没有小数点或分数部分。如果 D 被省略,默认是 0。如果 M 被省略,默认是 10。

{{< copyable "sql" >}}

Expand Down

0 comments on commit b6009d4

Please sign in to comment.