我正在尝试执行以下查询:
<appSettings>
但是,我收到以下错误:
DELETE FROM main_history WHERE id NOT IN (
SELECT max(id) FROM main_history GROUP BY instance_id, xpath, new_value
)
有没有办法在单个查询中直接在mysql中执行此操作?我正在创建一个像这样的tmp表:
You can't specify target table 'main_history' for update in FROM clause