Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2006-06-19
2
Medium Priority
?
1,492 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 200 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

885 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