Answer by echo_Me for Increment all values in mysql table
i think you are looking for something like that SET @bookid = 1; UPDATE books SET `id` =`id`+ @bookid ;your query wll always give id = 2
View ArticleAnswer by Walls for Increment all values in mysql table
Use this:ALTER TABLE books AUTO_INCREMENT=1;or if you haven't already id column, also add itALTER TABLE books ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT, ADD INDEX (id);
View ArticleIncrement all values in mysql table
Lets say I have +-------------+--------------+------+-----+---------+-------+| Field | Type | Null | Key | Default | Extra |+-------------+--------------+------+-----+---------+-------+| id | int(11) |...
View Article
More Pages to Explore .....