This article mainly introduces how to modify the Sequence type related to a table.
It is currently not supported to modify the Sequence type via
ALTER TABLE, but you can refer to the syntax below to modify the start value through
ALTER TABLE <name> ... AUTO_INCREMENT=<start value>
- If you want to modify the Sequence type related to a table, you need to find the specific name and type of the Sequence through the
SHOW SEQUENCEScommand, and then modify it using the
ALTER SEQUENCEcommand. For detailed operations, please see ALTER Sequence.
- After using Sequence, be cautious when modifying the starting value of
AUTO_INCREMENT(carefully assess the Sequence values that have been generated, as well as the speed of generating new Sequence values, to prevent conflicts).