语句:
DELETE FROM price_monitor WHERE EXISTS (SELECT 1 FROM price_monitor b WHERE b.domain = price_monitor.domain );
报错:
#1093 - You can't specify target table 'price_monitor' for update in FROM clause
该如何解决呢?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
根据你的表字段替换上面的id。 如果要保留id最小的数据, 就把MAX(ID)改成MIN(id)