HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

How to set Auto Increment to one 1 even after deleting records. PhpmyAdmin ( Php my admin)

56,236 views November 15, 2019 2:25

Watch on YouTube
ChannelCode Combination

Description from the creator

1)Go in your PhpmyAdmin database.
2)Select your database.
3)Open your Table whose id you want to reset.
4)go to Operations tab on that table.
5)Scroll all the way down, You will find two options
a) Truncate the table b)Delete the table
6)Click on Truncate the table and after that go on the SQL tab of your table and enter the following line.

"ALTER TABLE xyz AUTO_INCREMENT=1"

=============================================
The issue that comes up when you delete a record and primary key is messed up again
Solution: After deleting row place this query
DELETE FROM table_name WHERE id=xyz
ALTER TABLE table_name AUTO_INCREMENT = 1

About this tutorial

Code Combination published this 2:25 video tutorial on November 15, 2019. It has been watched 56,236 times on YouTube.

Duration
2:25
Published
November 15, 2019
Views
56,236
Likes
268

Tags

Share

This tutorial in other languages