[thelist] Auto Increment in database - a goofy question I am sure

Hans Zaunere zaunere at yahoo.com
Wed Apr 17 15:57:00 CDT 2002


In MySQL:

  ALTER TABLE thetable auto_increment=50;


Make sure this is really what you want to do, however.

Hans Z.
New York PHP
http://nyphp.org


--- Jay Blanchard <jay.blanchard at niicommunications.com> wrote:
> I remember looking for the answer to this at one time, and a current
> search
> reveals
> there to be some answers to this question (such as specialty software
> for
> specific
> database engines); Is there any way, other than dropping a table and
> then
> recreating
> that table, to reset an autoincrement value to begin its count from
> 1? The
> reason I
> ask is that I have a couple of tables who are rapidly approaching a
> limit
> for the AI
> index, but the numbers are no longer sequential due deletions of
> records.
>
> I could go the long route, dump the table to a file, drop the table,
> re-create the
> table and reload the data into the table...but if there is an easier
> way (at
> least
> less time consuming) I'll take it.
>
> TFAYHIA!
>
> Jay
>
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !


__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/



More information about the thelist mailing list