In the last episode (Feb 06), David T. Ashley said: > I remember in MySQL that you can define an integer table field as > AUTOINCREMENT and UNIQUE (I might have the specific keywords wrong, > but everyone will know what I mean). > > In the life of a database where there are frequent additions and > deletions, 2^32 isn't that large of a number. > > When the integer field reaches 2^32-1 or whatever the upper limit is, > what happens then? Will it try to reuse available values from > records that have been deleted? Or is it always an error?
It will roll over and return a "duplicate key" error on the first insert of a low-numbered value that still exists. If you think you're going to generate more than 2 billion records, use a BIGINT which will never roll over (well, if you inserted 2 billion records per second, it would roll over in ~270 years). -- Dan Nelson [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]