Let\'s say I have a Turtle table. When I run
SELECT * FROM Turtle ORDER BY Sort
I get this:
Id | Name | Sort 2 Leo 1 3
Try this
SELECT ID, Name, ROW_NUMBER() OVER(ORDER BY Sort) AS Sort FROM Turtle