Display previous row salary in the current row Display next row salary in the current row

Solve with steps
employee_id, salary
-----------------------------
10, 1000
20, 2000
30, 3000
40, 5000
output for (previous row salary in the current row) as below
employee_id, salary, pre_row_salary
-----------------------------------
10, 1000, Null
20, 2000, 1000
30, 3000, 2000
40, 5000, 3000
output for (next row salary in the current row) as below
employee_id, salary, next_row_salary
------------------------------------
10, 1000, 2000
20, 2000, 3000
30, 3000, 5000
40, 5000, Null

Questions by sai3689   answers by sai3689

 

This Question is not yet answered!

 
 

Related Answered Questions

 

Related Open Questions