MySqlに次のステートメントがあります:
delete from match_custom_field_team_value
where match_id=10648
and match_custom_field_id=14917
and event_id in (2, 6, 8, 4)
and team_id in (select mcfv2.team_id from match_custom_field_team_value mcfv2
where mcfv2.match_id=10648 and mcfv2.match_custom_field_id=14917 and mcfv2.event_id=9);
これを実行しようとすると、次のようになります。
Error Code: 1093. You can't specify target table 'match_custom_field_team_value' for update in FROM clause
エラーが発生する理由と、エラーを回避するために書き直す最善の方法はありますか? (一時テーブルでできることはわかっていますが、余分な手順は実行したくありません。)
ありがとう、
ジャレド