我在运行以下查询时遇到 MySQL 错误“您无法在 FROM 子句中指定要更新的目标表 'tasks'”:
DELETE FROM tasks
WHERE tasks.id IN
(
SELECT tasks.id
FROM tasks
JOIN deadlines ON deadlines.id = deadline_id
WHERE DATE_ADD(tasks.created_at, INTERVAL deadlines.duration DAY) <= NOW()
)
我该如何管理?
谢谢!