UPDATE category set sort=(case
when id=1 then 1
when id=5 than 2
when id=12 than 3
end)
UPDATE category set sort=(case
when id=1 then 1
when id=5 than 2
when id=12 than 3
end)
转载于:https://my.oschina.net/laks1127/blog/795548