title: How can I update more than one record in MS SQL?
body: <pre><code>Select Stackoverflow.* From Stackoverflow Where GeneralId = 1000;
  </code></pre>
  
  <p>The above sql returns 3 records like:</p>
  
  <pre><code>Id     GeneralId    Name             StateId
  1       1000        stack             null
  2       1000        stackover         null
  3       1000        stackoverflow     null
  </code></pre>
  
  <p>I want to update StateId of returned records.</p>
  
  <p>On the other hand </p>
  
  <p>It is possible sometimes the count of record can be 1, sometimes 3 like above example.</p>
  
  <pre><code>Select Stackoverflow.* From Stackoverflow Where GeneralId = 1001;
  </code></pre>
  
  <p>Above sql statement returns only one record.</p>
  
  <pre><code>Id     GeneralId    Name        StateId
  8       1001        stck         null
  </code></pre>
  
  <p>So how can I update these returned record.
  I think there should be a loop from 0 to the count of record and in that loop</p>
  
  <p>I only try to write Pseudocode. </p>
  
  <pre><code>Update    Stackoverflow
  Set StateId = 1
  where = "loop as I mentioned should be come?"
  </code></pre>
  
  <p>Isn't it? Any idea.</p>
  
  <p>Thank you.</p>