标签: mysql
我有一个查询SELECT id FROM log WHERE id NOT IN (SELECT id FROM table)。此查询工作正常,但我想删除属于此查询结果的所有行。如何使用mysql执行删除
SELECT id FROM log WHERE id NOT IN (SELECT id FROM table)
答案 0 :(得分:3)
您可以使用:
DELETE FROM log WHERE id NOT IN (SELECT id FROM table);