title: update in redshift table
body: <p>I have a very weird problem with a table in redshift, below are the steps that I took :</p>
  
  <pre><code>   1 : Alter table_name add columns flag integer
      /* table_name row count 10000*/
     2 :update table_name set
     flag = 1 
     where/* some condition*/
     -----rows affected 4000
  
  3.update table_name set
  flag = 0
  where flag&lt;&gt; 1
   ----rows affected 0
  </code></pre>
  
  <p>When I select from table_name where flag = 1 I get 4000 then why the remaing 6000 are not getting updated?
  Can anyone explain logic behind this? Thanks for your help!!</p>