我試圖做這樣的事情:MySQL - 如何從嵌套表中刪除select時使用該表?
DELETE FROM table_1
WHERE table_1.id IN (SELECT table_1.id
FROM table_1,
table_2,
table_3
WHERE table_1.id = table_2.table_1_id
AND table_2.id = table_3.table_2_id
AND table_3.id = 5)
好像MySQL不會讓我有在嵌套SELECT table_1
。建議?
我不知道爲什麼它不會......它會在執行DELETE之前執行SELECT。你遇到了什麼錯誤? – 2011-05-17 23:56:32