How to Sequence the row number?

Hi all,
I am deleting the rows using sql query where conditions like yes and no has no value…the query performing correctly it is deleting that particular rows from the table but the problem is the idx value is not in sequence…for example consider 4 rows in a table if row 2 and row 4 has value in yes checkbox remaining rows getting deleted from sql query in UI the table will display like row 2 and row 4 i need to display like row 1, row 2…in a sequence

Below screenshot after deleted the rows

Any idea?