Arrange the SNO after Delete Query Execute

Jun 29 2011 6:34 AM
I have a table name employees in that i have three columns named id , srno , and empname there are total 100 employee name in the table with tier respected id number now what i want that if an employee leaves the company the data relate to him or her should be deleted but at the same time sr no should be re arrange in proper format fo e.g
sr no
1
2
3
4
now when i delete sr no" 3 " sr no "4" should be converted to "3" and this loop should go till sr no "100"


Answers (1)