From: Martijn Tonies Date: January 9 2008 9:22am Subject: Re: why in procedure truncate table do not reset auto_increment? List-Archive: http://lists.mysql.com/mysql/210734 Message-Id: <008101c852a1$25ae6ea0$9902a8c0@martijnws> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > > [...] why in procedure TRUNCATE table > > demo do not reset auto_increment? > > is clearly written in the documentation, just read ... > > in short: > > auto_increment is used for primary key, primary keys could be referenced > from another table, setting auto_increment back to 0 could lead to using a > primary key formerly used by another datarow and still referenced by another > table - could lead to data inconsistency. lol, but TRUNCATE empties the table... What good are your references? :-) Martijn Tonies Database Workbench - development tool for MySQL, and more! Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com