0
I’m having a doubt, a stupid problem. Before to carry out this code:
CREATE TABLE tabela (
id int AUTO_INCREMENT,
title varchar(50),
descricao varchar(100),
PRIMARY KEY (id)
);
when putting the first element id started at 0. But for some reason, out of nowhere now it is starting at 1, wanted to know what happened and if you have how to make it start from 0.
thank you in advance
Didn’t work :(
– NoFace
From the manual: "Note: ALTER TABLE ... AUTO_INCREMENT = N can only change the auto-increment counter value to a value Larger than the Current Maximum." https://dev.mysql.com/doc/refman/8.0/en/innodb-auto-increment-handling.html#innodb-auto-increment-initialization
– anonimo
In the tbm documentation there is this part: "For example, you Might Try to set the counter value to a Lesser value after deleting some Records. In this case, the table must be searched to ensure that the new counter value is not Less than or Equal to the current Current Maximum counter value." :/
– Vinicius B