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
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
精彩评论