Homepage
I, Me and Myself
Portfolio
Mindfolio
Blog
Guestbook

Navig: Blog > Databases

Resetting Identity column value in SQL Server table

Posted on June 04, 08 @ 03:28 am under Databases.

To reset identity column value for a table in the SQL Server, execute the folllowing query.

DBCC CHECKIDENT('<TABLE_TO_RESET>', RESEED, 0)

This will set the Identity back to 0, and the next record getting inserted will start from 1 and proceeds to 2, 3, 4 .. and so on.

Comments

No comments.

•   Databases (6)
•   Diary (117)
•   HTML and Javascript (2)
•   For Your Information (18)
•   iSpecial Jokes (13)
•   Java related (1)
•   Javascript (1)
•   Jokes (41)
•   Mind Views (22)
•   My Observations (8)
•   Open Source Tech. (7)
•   PHP (6)
•   My Poetry (10)
•   Reviews (2)
•   Sing Along (21)
•   Sankaracharya Stotras (3)
•   My Talent (1)
•   Uncategorized (27)
•   Webservers (3)
•   Websites to see (28)
•   WML and WAP (3)
•   Zend Framework (10)

•   It is my personal site. Content included here is according to my wish. If you don't like my site, close it and go away.
•   'Mind Views' and 'My Observations' are purely opinions of mine and not others. If something in this site hurts you, control
     your mind and send me a mail. We will discuss. If you go to court of law, it's your wish. Every citizen has a right to express, so do I.
•   Some content in this site might not be appropriate for some audience, whose opinions differ with me. So don't try to argue with me.
•   Important: Don't try to judge me just by glancing this website. I am different outside.
•   This is a time-pass site. Reading it in a hurry will be useless.