title: How to output columns in UPDATE statement regardless if row updated
body: <p>I have this problem. I need to send 1 SQL query to update the <code>balance</code> (keeping with the <code>WHERE</code> conditions). I need to know if the row was affected or not. I also ALWAYS need the <code>last_bal_update</code> and <code>balance</code> column to be outputted to me EVEN IF the row was not updated. Also, we aren't sure if the <code>customer_id</code> exists or not. How can I do this.</p>
  
  <pre><code>UPDATE person
  SET
  balance = balance + 20
  last_bal_update = '2020-01-01 00:00:00'
  WHERE customer_id = 22423412 AND
  last_bal_update &gt; '2019-01-01 00:00:00'
  LIMIT 1
  </code></pre>