views:

122

answers:

1

I'm having a hard time trying to reset my ID/Name column in my google app. Right now it's on 3002, yet there's only 1 other peice of data still in the DB. I'm not even certain how it decided on 300x over like 1,2,3...

I'm sure this is a simple problem for someone more SQL inclined than I am :).

Thanks in advance!

+1  A: 

You can't. Generated IDs are guaranteed to be unique, but not sequential or contiguous. There's no facility for resetting the ID counters.

Nick Johnson
That sucks. Wonder why it jumped into the three and four thousands?
farina
why does it suck? how are you using the id?
Peter Recore
I guess it doesn't suck...I just get annoyed when things aren't in perfect order (starting with 0 or 1). Thanks again. :)
farina
It jumped because servers request IDs in chunks for efficiency. Sometimes a server restarts and its chunk of IDs gets discarded.
Nick Johnson