SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Jun 10, 2003, 07:12 #1
- Join Date
- Jun 2003
- Location
- Calif.
- Posts
- 16
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Can I reset the auto_increment field?
I created a table with an auto_increment field and made some test posts. Now I deleted those posts and I want to reset it so the first post is 1 again. How is this done?
-
Jun 10, 2003, 12:43 #2
- Join Date
- Oct 2002
- Location
- Iceland
- Posts
- 1,238
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
If everything is removed from the table, the auto_increment field resets automatically I belive..
- website
-
Jun 10, 2003, 12:46 #3
- Join Date
- Oct 2002
- Location
- Iceland
- Posts
- 1,238
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
and by reading the manual I found this
ALTER TABLE tbl_name AUTO_INCREMENT = 100
will start your records at 100
ALTER TABLE tbl_name AUTO_INCREMENT = 1000
will start your records at 1000- website
Bookmarks