Postgresql Reset Sequence

How to reset a seqence in Postgresql?

A sequence can be reset to a new sequence using the following ALTER SEQUENCE command.

ALTER SEQUENCE <sequence_name> RESTART WITH <number>;

Leave a Reply