I have a table with 2 fields
category_ID Category_name
1 india
2 china
3 japan
4 africa
5 france
I bind these data into grid in aspx page and in that i have given delete command and when i perform delete operation and if i delete china and japan i will be left with
category_ID Category_name
1 india
4 africa
5 france
As i am autogenerating category_ID . In the front end i get max(cateogry_id) + 1 for category_ID that is 6 for the new record
To overcome this problem i want my table to become like this
category_ID Category_name
1 india
2 africa
3 france
Is it possible for the Category_ID column to just assign 1 to n values for the fields present once i perform delete of any record
or
UPDATE command to solve this
or
Trigger or something
Please help