I have a table name [NavBar] with these columns:
Id [int]
Name [nvarchar]
DisplayOrder [int]
Sample data:
Id Name DisplayOrder
---------------------------
1 Home 1
2 Products 2
3 Contact 3
4 Career 4
I want to write a query to update DisplayOrder between two rows.
For example Contact = 4, Career = 3
Expected output:
1 Home 1
2 Products 2
3 Contact 4
4 Career 3
How do I perform update operation to toggle between two rows display order ?
Input parameter: Id of one row only
Aucun commentaire:
Enregistrer un commentaire