Last active
January 30, 2016 19:40
-
-
Save sotoz/b69cb0a0bf204bc2630d to your computer and use it in GitHub Desktop.
Update/Increment a single column on multiple rows at once
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET @a = 0; | |
UPDATE favorits SET order = @a:=@a+1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment