• Or create the table as suggested and use an SP to get the next value and replace for the next caller to keep the sequence up.

    Ex.

    CREATE PROCEDURE ip_NextKeyVal

    @val int OUTPUT

    AS

    SET NOCOUNT ON

    UPDATE tbl_NextKeyVal SET @val = col_KeyVal = col_KeyVal + 1

    GO

    Handles locking and value quite nicely.