473,396 Members | 1,971 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to Change AutoNumber Not Start From 1

I have a table with structure below :
Table_A
{
PGradeID int IDENTITY(1,1),
PName varchar(20)
}

If I delete all records on Table_A, and then fill some records,
PGradeID will no longer start from 1 anymore, everybody knows that. How
to change it so PGradeID will start from 1 after all records was
deleted?

Thanks b4

Resant

Jul 23 '05 #1
2 2476
Lookup the DBCC CHECKIDENT command. Also, if you TRUNCATE rather than DELETE
then the IDENTITY will be reset to seed.

Why do you care what the IDENTITY value is? It's usually fatal to attach any
significance to the value assigned by IDENTITY. If you care about the value
then IDENTITY isn't the right solution.

--
David Portas
SQL Server MVP
--
Jul 23 '05 #2
Reset identity value will not cause problem in my case, but I
appreciate your warning.
Thanks a lot, it's works!

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Charles Robinson III | last post by:
The AutoNumber sequence in my database is currently formatted as '000000'. When a new record is created, the AutoNumber would go from 000001, 000002, 000003 and so on. I want to track via...
7
by: Fatz | last post by:
I have a table that is an autonumber field. This table appears as a subform in another form. I want the ID# to show in the subform...but I don't want the (Autonumber) to show at the bottom of the...
5
by: ndn_24_7 | last post by:
Hello all, I'm designing a incident reporting program that allows our security department to record incidents. The problem i'm having is on a form, when ever a user is going to add a new...
4
by: Apple | last post by:
1. I want to create an autonumber, my requirement is : 2005/0001 (Year/autonumber), which year & autonumber no. both can auto run. 2. I had create a query by making relation to a table & query,...
4
by: Vladislav | last post by:
My customers have reported strange behaviour of the locally used modules for running the register on stroke patients, specifically, adding new patient to the register. When analising a sample, I...
2
by: samotek | last post by:
I want to change the autonumber of the field in table to 1000 and to preserve the old number from 1 to 22.Is there any code in Visla basic to do that?. This concerns my tables Houses where...
5
by: marko | last post by:
I would like my autonumber field to start at 100000. How can i do that?
6
by: Dr. Edmund M. Hayes | last post by:
I made a database and tested it a few times. I now wnat to use it in production. I deleted all the test data. Is there a way to tell it to start autonumbering from 1 or am I stuck with like 29...
6
by: PeteCresswell | last post by:
Got a table with "RecordID"=AutoNumber=PrimaryKey. Call it "tblIssuerRating". Ran a query that appends to that table from a work table. Inadvertantly appended from the work table's...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.