title: How does NOT EXISTS work in the following UPDATE statement in SQL?
body: <p>I have the following query:</p>
  
  <pre><code>UPDATE movieexec e
  SET    e.salary = 6m
  WHERE  NOT EXISTS (SELECT *
                     FROM   movieexec e2
                     WHERE  e2.salary = 6m); 
  </code></pre>
  
  <p>How does it work logically? Can't I just say <code>WHERE e.Salary != 6M</code> ?</p>