title: SQL UPDATE SELECT with WHERE
body: <p>I want to <code>UPDATE</code> a column in a table, but in each row there must go another value dependend on a <code>WHERE</code> of another row.</p>
  
  <p>This is how the table looks like.</p>
  
  <h2>BusinessUnitGUID | ClassName | DefaultGUID</h2>
  
  <pre><code>    5        | PriceList | 349FDAFD34M
      5        | Footer1   | 987IOXG376L
      5        | Header1   | 12WQX954MIO
      7        | PriceList | NULL
      7        | Footer1   | NULL
      7        | Header1   | NULL
  </code></pre>
  
  <p>Results should be this.</p>
  
  <h2>BusinessUnitGUID | ClassName | DefaultGUID</h2>
  
  <pre><code>    5        | PriceList | 349FDAFD34M
      5        | Footer1   | 987IOXG376L
      5        | Header1   | 12WQX954MIO
      7        | PriceList | 349FDAFD34M
      7        | Footer1   | 987IOXG376L
      7        | Header1   | 12WQX954MIO
  </code></pre>
  
  <p>But this shown query doesn't work, because it returns many rows and so it's not precise.</p>
  
  <pre><code>update cSC_BusinessUnit
  set defaultguid =
      (
      select defaultguid
      from cSC_BusinessUnit 
      where BusinessUnitGUID = 5
      )
  where BusinessUnitGUID = 7
  </code></pre>