Solved

set IDENTITY

Posted on 2006-06-26
3
298 Views
Last Modified: 2012-08-14
I have a table with identity and for some reason I removed the identity and forgot to return it.
When I finally returned it I got a very high number not what I was expected. How do set the identity to start from
a certain value that I choose?
Thankyou
Anat
0
Comment
Question by:ANAT2403
3 Comments
 
LVL 10

Expert Comment

by:ibost
ID: 16988195
you can use DBCC CHECKIDENT perhaps

Look it up in BOL.
0
 
LVL 69

Accepted Solution

by:
ScottPletcher earned 500 total points
ID: 16988208
DBCC CHECKIDENT ( 'table_name', RESEED, new_starting_value )
0
 
LVL 4

Expert Comment

by:Winsen
ID: 16990189
In addition to ScottPletcher's comment, please pay attention that, the next value insert would be (new_starting_value + 1) if new_starting_value > 1.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

920 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

15 Experts available now in Live!

Get 1:1 Help Now