How to change the Next Autoindex?? Any Help??



Hi there!

I have set up a table which has a primary key = ID. now, upon each new entry to the table, each row is assigned a new ID. This ID auto increments by 1. Now, as i am a begginer, i am testing what i can and can't do. This means i end up deleting alot of the rows. I am now at a Next AutoIndex of 252!!!!

Any suggestions on how i can reset this or change this??

I know that i can create a new table, but are there a ny other solutions????

Thanks in advance!!

the auto increment is reset when using TRUNCATE TABLE 'table_name'
Note: all data is deleted from the table

In phpMyAdmin there is a link: Empty Table -- it Truncates it
No there's not a way so you can have it ordered.
If you really need those ID's, you wont change them 'cause it will affect something. Otherwise, there's no need to use that auto_increment column.
however... i think you can use AUTO_INCREMENT = 50 so it will start from 50.... but i dont remember the syntax..

Hehe..still got my head spinning from my SQL kung-fu yesterday with one script... hehe...
all that is good only in case you have a clean table or the autoincrement value you are setting is larger then the highest id number: otherwise they will collide and it might result in some problems