Solved

Reset Identity to some value

Posted on 2009-05-13
4
191 Views
Last Modified: 2012-05-06
Hi

I have a column that is auto-incremented, how do I reset its incremental value to 30 for example?

I need an SQL syntax for that. and the database that this column is in is of MS SQL 2000
0
Comment
Question by:alfardan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
openshac earned 500 total points
ID: 24372660
DBCC CHECKIDENT (mytable, RESEED, 30)
0
 
LVL 6

Expert Comment

by:openshac
ID: 24372668
You might want to check the current identity value first:

DBCC CHECKIDENT ('mytable', NORESEED)
0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24372683
0
 
LVL 46

Expert Comment

by:tbsgadi
ID: 24373016
Have a look at the following:

http://technet.microsoft.com/en-us/library/ms176057.aspx

Good Luck!

Gary
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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…

624 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