MySQL Forums
Forum List  »  Newbie

Re: truncate table-auto increment values
Posted by: Peter Brawley
Date: May 15, 2014 02:57PM

After I fix your Create Table statement by adding missing commas ...

`Bookfrom` int(11) DEFAULT NULL,     -- comma was missing
`bookedfor` int(11) DEFAULT NULL,    -- comma was missing

... and after I supply missing referenced tables, your Create Table statement executes ok.

Then executing your Insert statement, a Truncate command, and Show Create Table shows auto_increment has been reset to 1.

Likewise after a new Insert at this point, last_insert_id() returns 1, showing again that auto_increment has been reset to 1.

So as I said six weeks ago, I am unable to replicate the behaviour you describe.

Options: ReplyQuote


Subject
Written By
Posted
Re: truncate table-auto increment values
May 15, 2014 02:57PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.