# [The database operation was expected to affect 1 row(s), but actually affected 0 row(s); 解决乐观并发](https://www.raokun.top/archives/thedatabaseoperatio
一:背景 1. 讲故事 相信大家在使用 SQLSERVER 的过程中经常会遇到 阻塞 和 死锁,尤其是 死锁,比如下面的输出: (1 row affected) Msg 1205, Level 13, State 51, Line 5 Transaction (Process ID 62) was