Reputation: 21
I have a table with some values and a seq column which orders the values and this gets displayed in the front end, so whenever I delete a record using a function, this seq is not arranged properly.
i.e.
col1:
1
2
3
4
5
after deletion of 2nd and 4th record. It comes as:
Col1:
1
3
5
I tried possible ways to re-order it as:
Col1:
1
2
3..
but its not working can some one please help in this?
Upvotes: 1
Views: 26
Reputation: 4030
I hope you are not talking about updating a primary key which is a very bad idea.
Otherwise you can do this
update table set col1 = rownum;
Upvotes: 1