After deleting the row from the indexed table, use the command below.
Delete code:
-- Delete records from the table
DELETE FROM library
WHERE lastModified > '07-29-2024';
I am doing DB RESEED
DBCC CHECKIDENT (table name, RESEED, 1200)
But I am getting an index from the last entry that is deleted.
table structure is here
CREATE TABLE library (
libIDX int IDENTITY(0,1) NOT NULL,
fullName varchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
lastModified datetime DEFAULT '1970-01-01' NOT NULL,
isHidden bit DEFAULT 0 NOT NULL,
CONSTRAINT PK_library PRIMARY KEY (libIDX)
);
What wrong I am doing here?
13