List:General Discussion« Previous MessageNext Message »
From:Sebastian Mendel Date:January 9 2008 9:17am
Subject:Re: why in procedure truncate table do not reset auto_increment?
View as plain text  
过客 schrieb:
> [...] 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.

-- 
Sebastian
Thread
why in procedure truncate table do not reset auto_increment?过客7 Jan
  • Re: why in procedure truncate table do not reset auto_increment?Sebastian Mendel9 Jan
    • Re: why in procedure truncate table do not reset auto_increment?x9 Jan
      • Re: why in procedure truncate table do not reset auto_increment?Sebastian Mendel10 Jan
  • Re: why in procedure truncate table do not reset auto_increment?Martijn Tonies9 Jan
    • Re: why in procedure truncate table do not reset auto_increment?Sebastian Mendel9 Jan
  • Re: why in procedure truncate table do not reset auto_increment?Martijn Tonies9 Jan
    • Re: why in procedure truncate table do not reset auto_increment?Sebastian Mendel9 Jan
  • Re: why in procedure truncate table do not reset auto_increment?Martijn Tonies9 Jan
    • Re: why in procedure truncate table do not reset auto_increment?Sebastian Mendel9 Jan