• I am glad to see so many people getting this right. And for 3 points!

    It certainly does not operate according to how I expect things to work. I just wished I had posted something more challenging than a simple script.;)

    Perhaps something like:

    Given a table defined as

    CREATE TABLE id_test (my_id INT IDENTITY(1,1) NOT NULL)

    and

    (select count(*) from given_table) = 0

    Select the right action to take to ensure that the next row inserted is 1

    a) DBCC CHECKIDENT(id_test, RESEED, 0)

    b) DBCC CHECKIDENT(id_test, RESEED, 1)

    c) it depends, a) OR b) depending on the circumstance.

    Bonus question:

    If you select c, you are correct. Now how would you determine which reseed statement to perform?

    I am really interested in the answer to the bonus question as I have not been able to crack this.