value rate 100 0 (100-100) 90 10 (100-90) 70 20 (90-70) 50 20 (70-50) 10 40 (50-10) im having a table with two columns 'value' and 'rate' in the value column im having the values . now i want to update the rate column as per i mentioned above (value in 1st row - value in second row) please tell me how to do it?