第1个回答 2013-07-11
delete from xx where id>=50 and id<=70;
update xx set id=id-20 where id>=71 and id<=100
这样做是可以满足你暂时的要求,但是有一点就是 ,如果你还有插入数据的话 ,那么它的id 就是从101开始了
第2个回答 2013-07-11
DELETE FROM xx WHERE id>50 AND id<70
UPDATE xxx SET id = id-21 WHERE id > 71
第3个回答 2013-07-11
delete from xx where id>=50 and id<=70;
update xx set id=id-20 where id>=71 and id<=100;