You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sql/datatype.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ The meaning of the fields:
64
64
65
65
| Syntax Element | Description |
66
66
| -------- | ------------------------------- |
67
-
| M | the length of the type. Optional. |
67
+
| M | the display width of the type. Optional. |
68
68
| UNSIGNED | UNSIGNED. If omitted, it is SIGNED. |
69
69
| ZEROFILL | If you specify ZEROFILL for a numeric column, TiDB automatically adds the UNSIGNED attribute to the column. |
70
70
@@ -175,8 +175,8 @@ TIME[(fsp)]
175
175
> A time. The range is '-838:59:59.000000' to '838:59:59.000000'. TiDB displays TIMEvaluesin'HH:MM:SS[.fraction]' format.
176
176
An optional fsp value in the range from0 to 6 may be given to specify fractional seconds precision. If omitted, the default precision is 0.
177
177
178
-
YEAR[(2|4)]
179
-
> A year intwo-digit orfour-digit format. The default is the four-digit format. In four-digit format, valuesdisplay as1901 to 2155, and0000. In two-digit format, values display as70 to 69, representing years from1970 to 2069.
178
+
YEAR[(4)]
179
+
> A year in four-digit format. Valuesdisplay as1901 to 2155, and0000.
180
180
181
181
```
182
182
@@ -308,7 +308,7 @@ In TiDB, the values of the SET type is internally converted to Int64. The existe
308
308
309
309
In this case, for an element of `('a', 'c')`, it is 0101 in binary.
310
310
311
-
For more information, see [the SET type in MySQL](https://dev.mysql.com/doc/refman/5.7/en/set.html)。
311
+
For more information, see [the SET type in MySQL](https://dev.mysql.com/doc/refman/5.7/en/set.html).
312
312
313
313
## Data type default values
314
314
@@ -330,4 +330,4 @@ Implicit defaults are defined as follows:
330
330
331
331
- For numeric types, the default is 0. If declared with the AUTO_INCREMENT attribute, the default is the next value in the sequence.
332
332
- For date and time types other than TIMESTAMP, the default is the appropriate “zero” value for the type. For TIMESTAMP, the default value is the current date and time.
333
-
- For string types other than ENUM, the default value is the empty string. For ENUM, the default is the first enumeration value.
333
+
- For string types other than ENUM, the default value is the empty string. For ENUM, the default is the first enumeration value.
0 commit comments