How to set default Identity Seed in SQL2k5

  • How can you set the default Identity Seed to 0 (when using the SQL Management Studio to create tables, etc). Out of the gate, it appears to be seeded at 1. This is a bit annoying in creating Identity fields in SQL2k5 using my QSL2k scripts which don't specify the IDENTITY (0,1) explicitly.

  • I don't think you can set the default value to '0' at the database level, either we need to write a iterative procedure that uses DBCC CHECKIDENT to scan through all the tables in the DB and reseeds the seed to '0' or has to be done by manually applying either in the scripts as mentioned by you (0,1) or has to be updated for every table in the management studio in the design mode.

    Prasad Bhogadi
    www.inforaise.com

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply