Solved

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

Posted on 2006-06-19
2
1,481 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 143

Accepted Solution

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

Expert Comment

by:Lowfatspread
ID: 16933237
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

839 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