Deadlock When Deleting by Foreign Key
Hi all in this post i will talk about a problem i suffered from for along time it’s Deadlock
when deleting from a table by value of Foreign .
i always get the error “Transaction (Process ID n) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.”
In order to solve this simply but an index on the Foreign key column this prevent
SQL from making table scan and locks the hole table