Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Creating own index

Author  Topic 

toticow
Starting Member

1 Post

Posted - 2004-11-10 : 08:09:57
Sorry about the title, could not think of anything better. I need an id field to store a sequence. If i have have 4 rows, the id column in each row would be 1,2,3,4. So this will work exactly like setting the column as an identity column. However, in the case where row 3 is deleted, I would need the next record that is added to become 3. Naturally the next one added will become 5. I hope you can understand what it is that I am trying to do. Any suggestions as to how to do this?

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-11-10 : 08:14:29
I have a question: why do you need to reuse gaps in the numbers? If the number is just to identify something, the value doesn't really matter as long as it is unique.
Go to Top of Page
   

- Advertisement -