Aarti Gupta

Aarti Gupta

  • 843
  • 963
  • 12.1k

how to reset identity column sequentially after deleting any row .

Oct 17 2020 11:39 PM
I have a table like shown below
   Id Name
 1 Aarti
 2 Kriti
 3 Priya
 if Kriti (2) got deleted then all her reputation earned is given to Priya (3) and all the rows below are promoted that is the table now  becomes like
 Id    Name
 1 Aarti
 2 Priya
 3 Rashmi
 4 Nancy
 
How to achieve the same in SQL server? 
 
 
 

Answers (6)