Solved

How to re-initialize Identity column without truncating table? can any one help!!!!!!!!!!

Posted on 2006-06-19
2
1,474 Views
Last Modified: 2008-01-09
How to re-initialize Identity column without truncating table? can any one help!!!!!!!!!!
0
Comment
Question by:application1973
2 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 50 total points
Comment Utility
dbcc checkident tablename (reseed, <new_seed>, <new_increment> )
0
 
LVL 50

Expert Comment

by:Lowfatspread
Comment Utility
what exactly do you wish to accomplish?

AngelIII's code will reset an identity Value to the new (new_seed) value if the identity does not have the NOT FOR REPLICATION clause  also specified on it...

do you want to reset a current identity value?
change the increment?
re-number all existing identity values?

...?

also which version / edition of SQL Server are we dealing with...?  
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now