Create index of the records with the help of a counter variable row_id