RE: autoincrement column
Try truncate table. It essentially drops the table and recreates it. -- DVP -Original Message- From: Arthur Radulescu [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 10:36 AM To: [EMAIL PROTECTED] Subject: autoincrement column Before switching to version 4.0.18 of MySQL the command delete from table was also reseting the autonincrement column value... It seems that this is not happening anymore after we have installed this version... Any idee about this problem? Is there any other way to reset this? Arthur -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: autoincrement column
Keep in mind you can't use truncate in a transaction though. I experienced this problem recently when wanting to delete an entire table and reset my auto increment values. While keeping it in a transaction. From: Dathan Vance Pattishall [EMAIL PROTECTED] To: 'Arthur Radulescu' [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: autoincrement column Date: Thu, 8 Apr 2004 12:50:58 -0700 Try truncate table. It essentially drops the table and recreates it. -- DVP -Original Message- From: Arthur Radulescu [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 10:36 AM To: [EMAIL PROTECTED] Subject: autoincrement column Before switching to version 4.0.18 of MySQL the command delete from table was also reseting the autonincrement column value... It seems that this is not happening anymore after we have installed this version... Any idee about this problem? Is there any other way to reset this? Arthur -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] _ Limited-time offer: Fast, reliable MSN 9 Dial-up Internet access FREE for 2 months! http://join.msn.com/?page=dept/dialuppgmarket=en-usST=1/go/onm00200361ave/direct/01/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Autoincrement Column reverting to zero...
On Wed, Jun 06, 2001 at 07:02:52PM -0700, Tyrone Mills wrote: SQL, QUERY I posted a little while back with a problem on several tables where the autoincrement column reverted to zero for no apparent reason. Now I know the reason, I just don't understand it, or know what to do differently. I find myself in the all too common situation where I can developing a backend system with a spec that changes more frequently than I care to mention. As a result I find that I am often required to add columns to tables on a live, production database. Today, after adding a column to a table, the very next insert into that table resulted in a value of 0, any subsequent inserts also try to use 0... That's odd. I've altered tables in the past an not had auto_increment columns revert to 0. Can you show us the SQL for the table and the ALTER TABLE statement you're running, maybe? Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878Fax: (408) 349-5454Cell: (408) 439-9951 MySQL 3.23.29: up 12 days, processed 77,922,544 queries (72/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php