title: subquery in where clause of UPDATE statement
body: <p>I have the database of ATM card in which there are fields account_no,card_no,is_blocked,is_activated,issue_date 
  Fields account number and card numbers are not unique as old card will be expired and marked as is_block=Y and another record with same card number ,account number will be inserted into new row with is_blocked=N . Now i need to update is_blocked/is_activated with help of issue_date i.e </p>
  
  <pre><code>UPDATE card_info set is_blocked='Y' where card_no='6396163270002509' 
  AND opening_date=(SELECT MAX(opening_date) FROM card_info WHERE card_no='6396163270002509')
  </code></pre>
  
  <p>but is doesn't allow me to do so
  it throws following error</p>
  
  <pre><code>1093 - You can't specify target table 'card_info' for update in FROM clause
  </code></pre>