How to delete from select in MySQL?
SELECT (sub)queries return result sets. So you need to use IN, not = in your WHERE clause. Additionally, as shown in this answer you cannot modify the same table from a subquery within the same query. However, you can either SELECT then DELETE in separate queries, or nest another subquery and alias the inner subquery … Read more