您好,欢迎来到外链网!
当前位置:外链网 » 站长资讯 » 专业问答 » 文章详细 订阅RssFeed

sqlserver自增id重置,数据库删除数据后自增id

来源:互联网 浏览:46次 时间:2023-04-08
让表从1再开始自增

清空表数据后的样子

删除表后,发现不是1,使用alter table table_name AUTO_INCREMENT=X (x为你想从几开始自增)或者使用(truncate table table_name)

参考链接(https://mrxf.github.io/2014/05/31/after-the-empty-navicat-mysql-table-id-since-increased-from-1-again/)

24608901