title: Multiple rows output into variables in MySQL
body: <p>The following query seems to only work when there is one single entry with <code>dateOfBirth</code> set to <code>1975-02-28</code>.</p>
  
  <p>It fails when there are multiple records matching this condition.</p>
  
  <p>Is it possible to delete all the addresses of users whose attribute <code>dateOfBirth</code> is set to <code>1975-02-28</code> without using a subquery?</p>
  
  <pre><code>SELECT @id:=(SELECT id
               FROM USER
               WHERE dateOfBirth='1975-02-28');
  DELETE FROM Address
  WHERE user_id=@id;
  </code></pre>
  
  <p>The exact error that I get is: <code>Error Code: 1242 Subquery returns more than 1 row.</code>.</p>