迁移老数据到新的数据库,需要把id迁移过来,这时序列值就需要修改为当前最大值加1了。 使用这个语句就可以让s_seq的序列值从7开始了。 alter sequence s_seq restart with 7