I have a table with the columns:
Name Number
Arun Null
Kiran Null
Varun Null
I want to update the number with a sequence number from 1-3 so it will look like this:
Name, Number
Arun 1
Kiran 2
Varun 3
How can I do this in H2 db?
Use case is this. Lets say I will add 10 records to the table. In one scenario I will delete 7th row. Now 1st 6 rows will have number 1-6. Since I have deleted 7th row, total number of rows are now 9. and 8th row and 9th row will have numbers 9 and 10. I want to modify it in such a way, no matter which row gets deleted, numbers will be auto arranged.