Skip to content

Commit

Permalink
sequence: remove the order keyword of sequence (#7417)
Browse files Browse the repository at this point in the history
* remove the order of sequence

Signed-off-by: ailinkid <[email protected]>

* Update sql-statements/sql-statement-create-sequence.md

Co-authored-by: TomShawn <[email protected]>
  • Loading branch information
AilinKid and TomShawn authored Nov 19, 2021
1 parent b5b33d9 commit e44163e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sql-statements/sql-statement-create-sequence.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ CREATE [TEMPORARY] SEQUENCE [IF NOT EXISTS] sequence_name
[ START [ WITH | = ] start ]
[ CACHE [=] cache | NOCACHE | NO CACHE]
[ CYCLE | NOCYCLE | NO CYCLE]
[ ORDER | NOORDER | NO ORDER]
[table_options]
```

Expand All @@ -60,10 +59,9 @@ CREATE [TEMPORARY] SEQUENCE [IF NOT EXISTS] sequence_name
| `INCREMENT` | `1` | 指定序列的步长。其正负值可以控制序列的增长方向。|
| `MINVALUE` | `1``-9223372036854775807` | 指定序列的最小值。当 `INCREMENT` > `0` 时,默认值为 `1`;当 `INCREMENT` < `0` 时,默认值为 `-9223372036854775807`|
| `MAXVALUE` | `9223372036854775806``-1` | 指定序列的最大值。当 `INCREMENT` > `0` 时,默认值为 `9223372036854775806`;当 `INCREMENT` < `0` 时,默认值为 `-1`|
| `START` | `MINVALUE``MAXVALUE` | 指定序列的初始值。当 `INCREMENT` > `0` 时,默认值为 `MINVALUE`; 当 `INCREMENT` < `0` 时,默认值为 `MAXVALUE`|
| `START` | `MINVALUE``MAXVALUE` | 指定序列的初始值。当 `INCREMENT` > `0` 时,默认值为 `MINVALUE`; 当 `INCREMENT` < `0` 时,默认值为 `MAXVALUE` |
| `CACHE` | `1000` | 指定每个 TiDB 本地缓存序列的大小。|
| `CYCLE` | `NO CYCLE` | 指定序列用完之后是否要循环使用。在 `CYCLE` 的情况下,当 `INCREMENT` > `0` 时,序列用完后的后续起始值为 `MINVALUE`;当 `INCREMENT` < `0` 时,序列用完后的后续起始值为 `MAXVALUE`|
| `ORDER` | `NO ORDER` | TiDB 暂时不支持 `ORDER` 选项,仅在语法上做兼容。|

## `SEQUENCE` 函数

Expand Down

0 comments on commit e44163e

Please sign in to comment.