<p>Consider that I have a transaction:</p>

<pre><code>BEGIN TRANSACTION
DECLARE MONEY @amount
SELECT Amount AS @amount
  FROM Deposits
  WHERE UserId = 123
UPDATE Deposits
  SET Amount = @amount + 100.0
  WHERE UserId = 123
COMMIT
</code></pre>

<p>And it gets executed on 2 threads, in the order:</p>

<ol>
<li>thread 1 - select</li>
<li>thread 2 - select</li>
<li>thread 1 - update</li>
<li>thread 2 - update</li>
</ol>

<p>Assume that before execution Amount is 0.</p>

<p>What will happen in this case in the different settings of SQL Server (read uncommited, read commited, repeatable read, serializable), what will be amount at the end, will there be a deadlock?</p>

I believe that you would want to use Repeatable read, which would lock the records, the first select would get the value, then it would update blocking thread two until it was completed.  Thus an end result of 200 in your example
Read uncommitted would result in both records setting the value to 100.
Read committed might have a bit of an intersting result, depending on timing of the two threads....
Here is a nice article I found about
Repeatable Read
as well, that provides a good example