• Good question Ron.

    There's a function IDENT_CURRENT(table_name) that gives the current identity value of the the table. I am not sure if it can be included in the DBCC statement itself...but you could declare it to a variable & use it. E.g.:

    DECLARE @ReseedValue INT;

    SELECT @ReseedValue = CASE WHEN IDENT_CURRENT('table_name') = 10 THEN 0 ELSE 1 END;

    DBCC CHECKIDENT(table_name',RESEED,@ReseedValue);

    Note: When the NORESEED shows CIV as NULL, IDENT_CURRENT will show the seed value of the identity column of [e.g. IDENTITY(5,10)] the table. For all other cases, IDENT_CURRENT() shows the current identity value of the table.

    The vision must be followed by the venture. It is not enough to stare up the steps - we must step up the stairs. - Vance Havner