473,554 Members | 3,197 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data Of AutoGenerate ID Columns Of Sql-2000 Server

71 New Member
I have a table as below:

Table : Dummy

ACID int, // Autoincrement Columns with Primary Key
Accname Varchar(100)

The ACID of Dummy Table are always increase the value, it’s fine. But the problem is that it’s continue the ID No. after deletion. e.g.:

Expand|Select|Wrap|Line Numbers
  2. ACID       accname
  3. -----------------
  4. 1    mahesh
  5. 2    mahendra
  6. 3    kirti

Now I deleted the above data from table and if I try to insert the new data on table than ACID start ID from No. “4” instead of No. “1”.
What to do for start ID at No. “1” again after deletion of old records from the table?
Apr 30 '11 #1
1 1419
2,878 Recognized Expert Specialist
Be careful of doing this. If your ACID is related to any other table, you might loose the relationship between the two tables.

What you are looking for is to reseed your identity value. For that, you can start reading this. If you just want to start from 1, use truncate table, not delete.

Good Luck!!!

~~ CK
May 2 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Jennifer Smith | last post by:
I want to be able to display my recordset as follows: a e b f c g d h Instead of : a b c d
by: GreenFROG Design | last post by:
Data Processing and SQL INSERTING Hello guy's i'm faced with a horrible dilemma i have whole dictionary that i have to enter into a database. I have all the text and i would like to convert it into a sql insert query so i don't have to enter all that data manually. I would like some recommendation on the best way i could get this data into...
by: alederer | last post by:
Hallo! I have a table tstest(ts char(13) for bit data constraint a unique). This column is filled in a trigger with generate_unique(). In a application (CLI), I have the values of this column as timestamp representation: e.g.: select timestamp(ts) from tstest 1
by: markaelkins | last post by:
I want to create a simple user interface to collect the following data and store the data in a SQL database…. Could someone please help me get started? Data to collect from user interface and store in database: tDateS (trade date sell) tDateB (trade date buy) contracts (number of contracts) strike (stike price) sValue (sell value)...
by: ypul | last post by:
Hi , Getting to the point directly, my query output doesnt have fixed columns , so I choosed "autogenerate columns" datagrid. I assign this dataset to my datagrid, but now I want my data should be hyperlinks, so that I can navigate from that page to another, depending on the link clicked. how can I do in autogenerate columns
by: Patrick B. | last post by:
I have an existing excel spreadsheet that my customers MUST continue using. There are 5 different specially formatted cell groups (tables) on one sheet where the use can enter data. The data in each of these "tables" corresponds to a different table in a SQL database. What is the quickest way for me to capture the click event of a button...
by: hazz | last post by:
in a databound scenario I have a database column value that is of type varchar with 3 discrete text values. Binding to this table column with autogenerated columns displays the text values in a DataGridViewTextBoxColumn column type. I would like to display images as follows but I need to do so with the DataGridViewImageColumn column type....
by: Newbie19 | last post by:
I am creating a project that would insert data into a SQL database when the User placed the information into the VB application. Then at a click of a button, it would add this data into the database. I am wondering what is the exact or direction of the VB code to insert the data into the database. I have the connectionstring created and I...
by: sthiru | last post by:
Hi, i have a sql database and lot of tables. I want to insert and update a sql table from excel. I can retrieve the data from sql table to excel sheet. But i have to send the data back to sql with the changes if any, from excel sheet. I have struggling in this part. This is my problem. Can you help any one to solve this problem. ...
by: dougancil | last post by:
I have a form that shows users data from a sql query. What I want to be able to do is when users make a change, they press a save button, the edited/changed data is saved to a new table and then the window is closed. I've looked for several tutorials for this. Can anyone give me an example of a good tutorial or a code example? My database that...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.