开发者

MySQL: Is there a way to reset a table?

Is there a way to reset a table开发者_如何学编程?

I mean not only deleting all rows, but starting the auto_incrementing ID back to 0?


To remove all data:

TRUNCATE TABLE tablename

To reset the auto-increment:

ALTER TABLE tablename AUTO_INCREMENT = 1
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜