update table by incrementing value in mysql

by Ramshan 2015-03-24 19:35:22

to update the table with the incremented number in mysql, you can use the following concept,
 
SET @strtVal = 0;
UPDATE table SET fieldname=(@strtVal := @strtVal+1) ;


 
4958
like
0
dislike
0
mail
flag

You must LOGIN to add comments