hi everyone,

i have a database table that was getting large.... i deleted all the entrys to start again but each time i add a new entry the id is continuing from the deleted list?

so instead of going 1 2 3 etc, its starting from 664, as if the old rows still existed

is there a way i can return the auto incrimented id to 1 again?

thanks

You have to reset the auto increment column. What database are you using?

Instead of deleting all the records you can truncate the table. This should reset the auto increment.

Yes truncating the table will work, at least I know for a fact that it works in MSSQL.

Don't confuse truncate with drop though... :-)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.