News for hackers. Stuff that matters.
Re:User-defined Order in SQL by dllthomas on Wednesday March 21, 2018 @06:38PM (#16643075)
idk if this is what the parent had in mind, but this seems straightforward enough:

    update t
    set user_order =
        case
        when id = 123
        then 500
        else user_order + 1
        end
    where id = 123 or user_order >= 500;

There are no comments on this comment yet.