Skip to content

Commit cfbb698

Browse files
authored
Merge pull request #870 from lilin90/sql-datatype
sql: update the YEAR type and syntax element
2 parents a4c4f66 + 662ff50 commit cfbb698

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sql/datatype.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ BIGINT[(M)] [UNSIGNED] [ZEROFILL]
6363

6464
| 语法元素 | 说明 |
6565
| ---- | --------|
66-
| M | 类型长度,可选的 |
66+
| M | 类型显示宽度,可选 |
6767
| UNSIGNED | 无符号数,如果不加这个标识,则为有符号数 |
6868
| ZEROFILL | 补零标识,如果有这个标识,TiDB 会自动给类型增加 UNSIGNED 标识,但是没有做补零的操作 |
6969

@@ -174,8 +174,8 @@ TIME[(fsp)]
174174
> 时间。范围是`-838:59:59.000000``838:59:59.000000`。以`HH:MM:SS[.fraction]`格式显示 TIME 值。
175175
fsp 参数是表示秒精度,取值范围为:0-6。默认值取 0
176176

177-
YEAR[(2|4)]
178-
> 两位或四位格式的年。默认是四位格式。在四位格式中,允许的值是 190121550000。在两位格式中,允许的值是 7069,表示从 1970 年到 2069
177+
YEAR[(4)]
178+
> 四位格式的年。允许的值是 190121550000
179179
```
180180

181181
## 字符串类型

0 commit comments

Comments
 (0)