At 2:42 PM -0600 11/23/01, Camilo Rostoker wrote:
>Lets say I have a simple table like this:
>CREATE TABLE User ( UserID INT(3) PRIMARY KEY NOT NULL AUTO_INCREMENT,
>Name VARCHAR(64) );
>If users are constantly being added to and deleted, this causes major
>gaps in the UserID field. Eventually,
>there will be 1000 users added, and so the UserID value will be too
>large. What happens then? Is there a way to remake the table and
>reassign UserID's starting from 1 ???
You're thinking that INT(3) means that the largest value the column
can contain. 3 is the display width, used for displaying values.
It doesn't constrain the range of the INT column type, which is much
larger than 999.
But one thing you could do is make your column UNSIGNED. You'll never
use negative numbers in the column, and making it unsigned doubles the
number of sequence numbers you can store in it.