Answers for "set auto increment"

SQL
1

set auto increment from 1

SET  @num := 0;

UPDATE your_table SET id = @num := (@num+1);

ALTER TABLE your_table AUTO_INCREMENT =1;
Posted by: Guest on June-10-2020
0

how insert auto increment

ALTER TABLE yourTableName
MODIFY yourColumnName INT NOT NULL AUTO_INCREMENT;
Posted by: Guest on April-27-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language