I have a table named tbl_course nad the data is like
SID name DisplayOrder course
1 Apple 1 1
2 Orange 2 1
3 Banana 4 1
4 Grape 3 1
5 Orange 2 2
6 Banana 1 2
In the web page it will show order by displayorder.
Now in the bo side i will showing this values in grid with order buttons to change order by admin .

When I click on down arrow automatically swap to next item.
Eg:If I click on 1st down arrow from below image(Apple) so its will come to 2nd row and orange will come 1st row.
So i want to write sp for this with help of course.
Thanks in advance.
Assuming that
@clickedDownand@courseIdare two parameters passed to your stored procedure, all it needs to do is to run this update statement: