title: SQL Server : are transaction locking table for other users?
body: <p>Does a transaction lock my table when I'm running multiple queries?</p>
  
  <p>Example: if another user will try to send data in same time which I use transaction, what will happen?</p>
  
  <p>Also how can I avoid this, but also to be sure that all data has inserted successfully into database?</p>
  
  <pre><code>Begin Tran;
      Insert into Customers (name) values(name1);
  
      Update CustomerTrans 
      set CustomerName = (name2);
  
  Commit;
  </code></pre>