0
我一直在處理一個查詢,該查詢採用表記錄的子集並更新它們,但不知何故,我是不能讓它工作,它給我的錯誤#1093 - You can't specify target table 'members' for update in FROM clause
無法運行查詢給出mySQL錯誤#1093 - 您無法在FROM子句中指定目標表「成員」進行更新
下面是該查詢:
UPDATE members set is_deleted = 1
WHERE EXISTS
(SELECT m1.member_id FROM members as m1
WHERE m1.member_id NOT IN
(select member_id
from membership_payment_profiles
WHERE (next_date_to_charge > "2012-12-31 00:00:00"
or next_date_to_charge is null)
order by next_date_to_charge DESC
)
and m1.joined_on < "2012-12-31 00:00:00"
)