title: MySQL update query on multiple rows
body: <p>I need to update my database its a soft delete on multiple row based in locationId</p>
  
  <pre><code>update device d
  set d.deleteDate='2016-05-07'
  where d.id in (select dtg.deviceId from devicestogroups dtg
                 where dtg.groupId in (select g.id from `group` g
                                       where g.locationId ='1'));
  </code></pre>
  
  <p>When I run the query I get the error: </p>
  
  <blockquote>
    <p>Error Code: 1175. You are using safe update mode and you tried to
    update a table without a WHERE that uses a KEY column To disable safe
    mode, toggle the option in Preferences -> SQL Editor and reconnect.</p>
  </blockquote>
  
  <p>Subquery will return me 2 records as I know because subquery returns two record update will not happen, but how do I solve this issue. I tried to solve but not successful. </p>