title: SQL query to update a table's column from another table
body: <p>I have 3 tables:  SITES, DEVICES AND LOADS.</p>
  <ul>
  <li>SITES columns are (ID, default_MGR_ID);</li>
  <li>DEVICES columns are (ID, site_id (which is the foreign key of sites))</li>
  <li>LOADS columns are (ID, device_id (foreign key of devices), site_mgr_id)</li>
  </ul>
  <p>I want to update LOADS.site_mgr_id to be equal to SITES.default_mgr_id.</p>
  <p>Can you help me write a SQL query to do that?</p>
  <p>This is the query I have so far but is not working:</p>
  <pre><code>UPDATE loads SET loads.site_mgr_id =(SELECT default_site_mgr_id FROM sites s WHERE s.id =(SELECT site_id FROM devices d WHERE d.id = loads.device_id)
  </code></pre>