So to try and keep things brief, I need to get all the information in my database between rows x and y. Now I have a globalId column which auto increments, however, when I delete a row from the database (which I will be doing), the next piece of data inserted will have a globalId +1 of the data deleted, as expected. This then creates an issue because I can't iterate simply with a for loop between my x and y value, and get all data points where globalId = i. If I could get the index of the row, that, however, would not have gaps from past rows which have now been deleted. I've tried many methods to get the row index but nothing seems to be working.
I am using Java for this and so I have a ResultSet returned from my query if that helps.