title: How do I update two tables that have a reference table in SQL Server?
body: <p>I have 3 tables.</p>
  
  <pre><code>1. Users 4 Cols
  UserID - UserName - RealName - Flags
  
  2. UsersGroups 2 Cols
  UserID - GroupID
  
  3. Groups 3 Cols
  GroupID - GroupName - Flags
  </code></pre>
  
  <p>What I want to do is select a specific UserName ie USERA and update the Flags column.
  but I also want to update the Flags column in the Groups table to the same value.</p>
  
  <p>The only connection I have between the 2 tables is the UsersGroups table.</p>
  
  <p>What is the best way to do this?</p>