Skip to content

Instantly share code, notes, and snippets.

@kobeumut
Created September 29, 2017 06:12
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 kobeumut/c29587905cbf78308ed9d6b72b1b19da to your computer and use it in GitHub Desktop.
Save kobeumut/c29587905cbf78308ed9d6b72b1b19da to your computer and use it in GitHub Desktop.
New id field sql query with increasing number.
SET @serial=0;
UPDATE table_name SET new_product_id = @serial := @serial+1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment