Archive for December, 2008

MySQL increasing ID manually

Saturday, December 13th, 2008

Some times it’s necessary to assign a consecutively increasing ID field to a set of rows. Autoincrement is available, but you would need to leverage an INSERT in order to make use of MySQL’s autoincrement feature. Fortunately, it is possible to do this in place by using a separate counter variable in an UPDATE statement.

Read more »