List:General Discussion« Previous MessageNext Message »
From:Daniel Kasak Date:June 14 2006 4:51am
Subject:Re: Reset (or Defrag) the AUTO_INCREMENT columns
View as plain text  
wolverine my wrote:

> Yes, I agree on what you have described.
>
> However, what should we do when the value is reaching the maximum? To
> alter the data type to a bigger one?

Yes - convert the data type to a larger one.

If you've got a mediumint, for example, you can convert it to an
unsigned mediumint. The 'unsigned' bit means that the field won't store
negative values - this gives you twice the positive numbers you can
store. Otherwise if you're already using an unsigned data type, then
just go up to the next data type ( eg mediumint to int, or int to
bigint, etc ).

-- 
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak@stripped
website: http://www.nusconsulting.com.au
Thread
Reset (or Defrag) the AUTO_INCREMENT columnswolverine my14 Jun
  • Re: Reset (or Defrag) the AUTO_INCREMENT columnsDaniel Kasak14 Jun
    • Re: Reset (or Defrag) the AUTO_INCREMENT columnswolverine my14 Jun
      • Re: Reset (or Defrag) the AUTO_INCREMENT columnsDaniel Kasak14 Jun
        • RE: Reset (or Defrag) the AUTO_INCREMENT columnsDaevid Vincent14 Jun
  • Re: Reset (or Defrag) the AUTO_INCREMENT columnsMarco Simon14 Jun