title: SELECT then UPDATE those records and then return them in STORED PROCEDURE
body: <p>I want to do a SELECT to get a list of ID's, do an update based on those ID's and then return those records.</p>
  
  <p>Something like this I guess, I just do not know the syntax:</p>
  
  <pre><code>  SELECT WebHookLogIDs = FROM WebHookLog 
                  WHERE Processing=0
                      AND Processed=0
                          AND Paused=0
                              ORDER BY FailCount ASC, WebHookLogID DESC
  
      UPDATE WebHookLog
          SET Processing = 1
              WHERE WebHookLogID IN(WebHookLogIDs)
  
      SELECT * FROM WebHookLog 
              WHERE WebHookLogID IN(WebHookLogIDs)
  </code></pre>