Skip to content

Instantly share code, notes, and snippets.

@PharaohKJ
Created August 29, 2014 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PharaohKJ/f968799a6a719fe09383 to your computer and use it in GitHub Desktop.
Save PharaohKJ/f968799a6a719fe09383 to your computer and use it in GitHub Desktop.
行番号をorderカラムにする
SET @i := 0;
UPDATE `tablename` SET `order` = (@i := @i +1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment