1 posts in total

Sequence

Posts tagged

Re-initializing table sequence in postgresql

by Syed Aslam · 1 min read

Re-initializing a table sequence is quite normal and required in some cases. I had to do that recently. If the table has data and needs to be preserved, then temporarily you have to move the data, delete the data in original table and re-initialize the sequence and copy the original data again. Let's see how to re-initialize table sequence in PostgreSQL.