Created
November 27, 2017 15:35
-
-
Save davidsheardown/2e80efc34370c3ad64a411549805f67e to your computer and use it in GitHub Desktop.
MS SQL Increment an existing INT field
This file contains 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
/* | |
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