mysql--id主鍵列亂了以後,從新排序

1.問題詳述 當咱們使用自增變量的時候,刪除其中一條數據,其序列不會減少,而是會繼續增加,不符合咱們的要求,爲此提出解決辦法。web 2.方法 核心思想是刪除序列再從新排序,方法以下數據庫 alter table category drop cid; alter table category add cid int(3) not null first; alter table category m
相關文章
相關標籤/搜索