> >>> [...] 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
> >> from another table, setting auto_increment back to 0 could lead to
> >> 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?
> LOL ??? very funny, really
> why not read the manual before posting? could help me save a lot of time
You don't have to answer if you want to save time :-)
> only one table is truncated, not the one referencing to this one
I know that.
> it is better to have references leading to 'nothing' than to a wrong
> ... i think this is very easy to understand - better save than sorry!
Why is a row with an invalid reference better? It's invalid data and you
corrupted your database.
The point I'm trying to make is that this part of the documentation is a bit
strange, to say at least.
The only benefit I could thing of, is being able to re-fill the table with
original data, but then your auto-inc should be turned OFF in between the
mass INSERT and normal operations.
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Database development questions? Check the forum!