Home / Article Detail

MYSQL reset AUTO_INCREMENT to ensure that IDs start at 1

📅 Jan 29, 2025✍️ lllomh

    reset AUTO_INCREMENT to ensure that IDs start at 1

    it's will start not at 1, if will deleted row then add it.

    ALTER TABLE Players AUTO_INCREMENT = 1;
    ALTER TABLE Tournaments AUTO_INCREMENT = 1;
    ALTER TABLE Matches AUTO_INCREMENT = 1;


    Then it will start at 1.