我有MySQL錯誤「您不能指定目標表‘任務’在FROM子句更新」運行下面的查詢: 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, INTERVA
下面的查詢: DELETE FROM CO05IN.ININVPRC WHERE IPPART IN (SELECT IPPART FROM CO05IN.ININVPRC left join CO05IN.ININVMST on IPPART = IMPART where IMPART is null);
創建此上的日誌:您不能指定目標表「ININVPRC」在FROM子句更新。 這是什麼造成
DELETE FROM table_a WHERE id IN(
SELECT table_a.id AS id FROM table_a, table_b
WHERE table_a.object_id = 1 AND table_a.code = 'code'
AND table_a.code = table_b.code
AND table_b.id
我想做一些看起來像在mysql中簡單刪除但有一些麻煩。我想這樣做: delete from table where col_name not in (select distinct col_name from table);
此表沒有唯一的密鑰。當我嘗試,我得到的錯誤: You can't specify target table for update in from clause; Erro