How to reset AUTO_INCREMENT attribute of a column in MySQL table

AUTO_INCREMENT attribute in database tables is used to increase (+1) the integer value automatically. So, to reset value of AUTO_INCREMENT attribute for a table use the following SQL query:

ALTER TABLE tablename AUTO_INCREMENT = 1

Replace the tablename with the exact table name.

Category → MYSQL

Other → Bookmark this Article  |  Add New Comment  |  Trackback URL

You might also like...