Since DBs do not reuse numbers of deleted records you'll be able to exhaust amounts, particularly if you pick not just a large integer type with this column.
An amount happen and just how to avoid it whether it's bad?

// SQL Server, MySQL //

You finish track of a 3+ Hour Down time, like Slashdot did on their own Comments-Function.

I believe precisely what happens is going to be determined by which database engine you are using (there might be also variations between INNODB and MyISAM in MySQL). No matter what, it will not be pretty.

You'd can simply alter the column type to some bigger integer.

For MySQL, it is documented that:

The behaviour from the auto-increment mechanism isn't defined if your user assigns an adverse value towards the column or maybe the worthiness becomes larger than the utmost integer that may be saved within the specified integer type.

Most database systems possess a number datatype that may be wider than 32 bits. Should you anticipate a lot more than 2^32 records you need to use a suitable key width.

Yes it's possible: should you only permit 2 digit amounts you are able to have only IDs as much as 99, and so forth. Card inserts would fail when the limit was arrived at. It's a few good sense to select a suitable size.

In Postgres, the "serial" type is the same as the development of a SEQUENCE using the NO CYCLE option, and setting the default from the area to nextval. Tiring this type of sequence produces a mistake:

It is dependent in your database, In my opinion in MS SqlServer, you just cannot place any new rows before you repair the problem. The final time I experienced it, we fixed the issue by reseeding the identity column to at least one. That's clearly not really a universal fix, however it was comfortable with our situation.

Oracle does not support autoincrementing ID posts and standard practice is by using a sequence generator. A sequence creates integers as high as 28 numbers, if you exhaust individuals then ... I suppose you've got a pretty large table. But behavior would then be determined by the configuration from the sequence generator -- either a mistake or it might cycle to the beginning value and you'd obtain a PK constraint breach around the next place.

I attempted this in SQL 2000 a while ago. After Integer.MaxValue the following identity value is Integer.MinValue. After that it keeps counting up understandably. As lengthy because the records that accustomed to exist at 1,2,3 etc go when it will get there nothing bad may happen. Whether it incurs a replica (and also the area may be the primary key) then your place fails having a key breach. I've not attempted a name column that is not restricted to unique values though. I'd guess it might be pleased with the replicates.

Generally you will get a mistake. Make use of a BIGINT if you're paranoid.