如果id為唯一索引的話
你要先把id為15的改成一個不在id內(nèi)的數(shù)字
比如
update 表名 set menuid=0 where menuid=15;
commit;
然后把其他的加1
update 表名 set menuid=menuid+1 where menuid between 1 and 14;
commit;
最后,把之前15,后來改成0的那個改成1
update 表名 set menuid=1 where menuid=0;
commit;
不同情況不同處理,不過這個應該能解決你問題了