Click to See Complete Forum and Search --> : Question about the increment


Exceter
July 31st, 2003, 12:06 AM
Hi,
Simple question :
I have a table and one column is ID (int identity(1,1) not null).
Say I have 5 rows:
ID Name Color
1 Bob White
2 Jane Black
3 Lucy Red
4 Gang Brown
5 Dub Yellow

If I delete the row 3, the remaining ID's are 1, ,2, 4, 5.
Is it possible to make the remaining after the deletion row 3 1, 2, 3, 4?
that is the above ID's to decrement.

vonarxma
July 31st, 2003, 04:42 AM
In ur case ID is the primary key. I recommend u to insert a new field for "nummeration", then you can change/set this field e. g. by a trigger.