Skip to content

Commit

Permalink
auto-increment: Mention FORCE
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden authored and ti-chi-bot committed Apr 14, 2022
1 parent 2da602b commit 6fd2176
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions auto-increment.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,3 +339,4 @@ Currently, `AUTO_INCREMENT` has the following restrictions when used in TiDB:
- It cannot be specified on the same column with the `DEFAULT` column value.
- `ALTER TABLE` cannot be used to add the `AUTO_INCREMENT` attribute.
- `ALTER TABLE` can be used to remove the `AUTO_INCREMENT` attribute. However, starting from v2.1.18 and v3.0.4, TiDB uses the session variable `@@tidb_allow_remove_auto_inc` to control whether `ALTER TABLE MODIFY` or `ALTER TABLE CHANGE` can be used to remove the `AUTO_INCREMENT` attribute of a column. By default, you cannot use `ALTER TABLE MODIFY` or `ALTER TABLE CHANGE` to remove the `AUTO_INCREMENT` attribute.
- `ALTER TABLE` requires the `FORCE` option to set the `AUTO_INCREMENT` value to a lower value.

0 comments on commit 6fd2176

Please sign in to comment.