Is it possible to change the sequence backing an identity column?
2
votes
1
answer
578
views
After a machine malfunction and a hurried transfer of data onto another machine, we have somehow ended up with some brand new sequences replacing old sequences as the backing for identity columns (and for some old serials).
We can
RESET
the new sequences with the maximum values in the tables, and also use ALTER SEQUENCE ... RENAME
to rename the new sequences to the old names (to get around any hard-coding in the client code) but I was wondering if it was possible to swap the old sequence back in place instead?
Asked by John Denniston
(23 rep)
Apr 11, 2024, 09:20 AM
Last activity: Apr 11, 2024, 11:15 PM
Last activity: Apr 11, 2024, 11:15 PM