Skip to content

Instantly share code, notes, and snippets.

@davidsheardown
Created November 27, 2017 15:35
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 davidsheardown/2e80efc34370c3ad64a411549805f67e to your computer and use it in GitHub Desktop.
Save davidsheardown/2e80efc34370c3ad64a411549805f67e to your computer and use it in GitHub Desktop.
MS SQL Increment an existing INT field
/*
Increments an INT column in MS SQL
*/
Update MyTable
set testCount= ISNULL(testCount, 0) + 1
where MyTableId = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment