I have a SQL Server 2016 table and it has than 10,000 rows. The Id
column is a sequential id incremented by 1. But that Id
is not in the correct order as shown in the screenshot below where 330 is missing. Is there any way to correct this sequence in an existing table?
I've tried like below but it's not working.
CREATE SEQUENCE contacts_seq
AS BIGINT
START WITH 1
INCREMENT BY 1
MINVALUE 1
MAXVALUE 99999
NO CYCLE
CACHE 10;