Re: auto_increment

From: Date: Tue, 28 Dec 2004 11:39:24 +0000
Subject: Re: auto_increment
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-37885@lists.php.net to get a copy of this message
Thanks Larry. It was mySQL ... Ron On Sun, 26 Dec 2004 20:47:37 -0500, Larry E. Ullman wrote > > I have the auto_increment on one of my variables. During the past few > > days > > I have been doing testing on a "live" database and created several test > > records which I now have deleted from my table. Is there any way of > > setting > > the auto_increment value to match the last "correct" number? Ron > > You don't say what database application you're using, but if it's > MySQL, you can change the auto increment value using: > ALTER TABLE tablename AUTO_INCREMENT = 1 > > That being said, you actually don't have to do this (and often > shouldn't, really). Having gaps in your auto increment sequence > shouldn't be a problem. > > Larry

« previous php.db (#37885) next »