问题描述:

I tried to find out the correct way to do this via googling but I am not finding anything helpful.

I am wanting to insert a row before id 60 and id is an auto incrementing value. In the end I want to have all the values of id to be bumped up by 1 so there isn't a collision on the primary key of id.

网友答案:

Try this::

Step1:

update table set id=id+1 where id>=60

Step2:

Insert into table(id, column1....) values (60,....)
相关阅读:
Top