title: Two different transactions updating different rows of same table at same time
body: <p>Environment: SQL SERVER 2008 R2, Windows.</p>
  
  <p>CONNECTION-1: executing following</p>
  
  <pre><code>BEGIN TRANSACTION               
  
      UPDATE Check_lock with (rowlock)
      set LayoutType = 98
      where USERID between 1 and 7;
  
      WAITFOR DELAY '000:10:00';
  
  COMMIT TRANSACTION;
  </code></pre>
  
  <hr>
  
  <p>CONNECTION-2: executing following</p>
  
  <pre><code>BEGIN TRANSACTION               
  
      UPDATE Check_lock with (rowlock)
      set LayoutType = 98
      where USERID between 15 and 20;
  
  COMMIT TRANSACTION;
  </code></pre>
  
  <hr>
  
  <p>Problem Statement: I am executing above transactions through SQL Server Management Studio by making two connections with the same server/database on same machine at same time.
  Though the table is same &amp; transactions are executing at same time (not 100% same time, because executing manually) but updating different rows (row-level locking) then why the "Conneciton-2" transaction did not get committed immediately and goes in wait until the first transaction is not committed/completed. ??</p>
  
  <p>Please let me know if I didn't describe my scenario clearly.</p>