Created
May 28, 2018 23:46
-
-
Save jinan-kordab/9879a3774da6ca1ed0f93ac626861a08 to your computer and use it in GitHub Desktop.
Second Instance in an example how to test and avoid SQL deadlock
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
--2 | |
BEGIN TRAN; | |
Update TBL_test_temp_two set | |
TWOcolumnone =N'AAAAAAAA', | |
TWOcolumntwo =N'AAAAAAAAAAAAAA' | |
Where PK =1 | |
And TWOcolumnone =N'AAAAAAAA' | |
AND TWOcolumntwo = N'AAAAAAAAAAAAAA' | |
COMMIT; | |
--4 | |
BEGIN TRAN; | |
Update TBL_test_temp set | |
TESTCOLUMNONE =N'TTTTTTTT', | |
TESTCOLUMNTWO =N'TTTTTTTTTTTTTT' | |
Where PK =1 | |
And TESTCOLUMNONE =N'TTTTTTTT' | |
AND TESTCOLUMNTWO = N'TTTTTTTTTTTTTT' | |
COMMIT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment