Skip to content

Commit 0b3709c

Browse files
authored
sql: YEAR(2) is not supported, M is display width (#608)
* YEAR(2) is not supported, M is display width * Fixed punctuation point (existing issue)
1 parent 0155339 commit 0b3709c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sql/datatype.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The meaning of the fields:
6464

6565
| Syntax Element | Description |
6666
| -------- | ------------------------------- |
67-
| M | the length of the type. Optional. |
67+
| M | the display width of the type. Optional. |
6868
| UNSIGNED | UNSIGNED. If omitted, it is SIGNED. |
6969
| ZEROFILL | If you specify ZEROFILL for a numeric column, TiDB automatically adds the UNSIGNED attribute to the column. |
7070

@@ -175,8 +175,8 @@ TIME[(fsp)]
175175
> A time. The range is '-838:59:59.000000' to '838:59:59.000000'. TiDB displays TIME values in 'HH:MM:SS[.fraction]' format.
176176
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.
177177

178-
YEAR[(2|4)]
179-
> A year in two-digit or four-digit format. The default is the four-digit format. In four-digit format, values display as 1901 to 2155, and 0000. In two-digit format, values display as 70 to 69, representing years from 1970 to 2069.
178+
YEAR[(4)]
179+
> A year in four-digit format. Values display as 1901 to 2155, and 0000.
180180

181181
```
182182

@@ -308,7 +308,7 @@ In TiDB, the values of the SET type is internally converted to Int64. The existe
308308

309309
In this case, for an element of `('a', 'c')`, it is 0101 in binary.
310310

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).
312312

313313
## Data type default values
314314

@@ -330,4 +330,4 @@ Implicit defaults are defined as follows:
330330

331331
- For numeric types, the default is 0. If declared with the AUTO_INCREMENT attribute, the default is the next value in the sequence.
332332
- 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

Comments
 (0)