Posted By

hlubek on 01/29/09


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

dantreacy
virendrakryadav


Number records with incrementing ID (add an ID column to an existing table)


 / Published in: MySQL
 

  1. SET @id := 0;
  2. UPDATE users SET id = (@id := @id + 1) WHERE id = 0;

Report this snippet  

You need to login to post a comment.