Incrementing values in Mysql

As the saga continue manipulating data this comes in handy to increment all the id’s in a table

UPDATE jos_content_old SET id = id + 50 WHERE (id = id)

Keep in mind the resulting id being set must be higher thatn any existing ones or ther will be an error.

This entry was posted in MySQL and tagged , . Bookmark the permalink.

Comments are closed.