I need to update my database its a soft delete on multiple row based in locationId
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'));
When I run the query I get the error:
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.
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.