Hi @Khan-CW, P Ali Altaf 63769,
Thanks for your kindly feedback.
We cannot determine whether a deadlock will occur just rely on the where or with where clause, we should look at the logic of the statement, all deadlocks boil down to out-of-order resource access patterns. Just as Erland and Omar say, the reason for the deadlock is:
You are pointing to the same table; they are using the same resources.
Both processes have a multi-statement transaction in progress, and both processes have updated rows in the table that the other process is reading
You can also check out the article I provided in last answer; it explains the deadlock in detail. ,
In addition, this article is well worth for us to spend time reading it, hope this can help you understand more about deadlock and how to troubleshoot.
Best regards,
Lucy Chen
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
https://docs.microsoft.com/en-us/answers/support/email-notifications