I need to do this for testing only, but then undo it when the test is done.

I have seen some tutorials online on how to re-seed a table, but not so much on how to undo it.

Let's say the table definition is the following:

create table beer
(
 beer_id  numeric(10) not null,
 mnemonic        nvarchar(8)
);
go

Let's say that I want the new identities to temporarily start at 12345, and at the end delete the new rows and set the next identity to what it would have been.

Edit
Report