MySQL Forums
Forum List  »  German

AUTO_INCREMENT "rücksetzen"
Posted by: Jörg Büchner
Date: December 19, 2008 03:39PM

Guten Abend,

folgendes Szenario:
In einer Tabelle werden alte Datensätze automatisch gelöscht, so dass, sagen wir, nie mehr als 100 Datensätze vorhanden sind. Damit die ID (AUTO_INCREMENT) nicht ins "Uferlose" wächst, soll sie auf 1 zurückgesetzt werden, wenn 1000 erreicht ist.
MySql lässt einen neuen AUTO_INCREMENT-Startwert, der unterhalb des Maximums liegt, aber nicht zu.
Wie würdest Ihr dieses Problem lösen? Die bestehenden Datensätze (900-999) sollen MIT ihrer ID bestehen bleiben.

Gruß

Jörg

Options: ReplyQuote


Subject
Views
Written By
Posted
AUTO_INCREMENT "rücksetzen"
3493
December 19, 2008 03:39PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.