i want to delete a product with the min "sale_quantity" in table product.
and This is my query:
use warehousingaquarium;
delete from product
where product.sale_quantity = (select min(p2.sale_quantity)
from product p2);
SET SQL_SAFE_UPDATES = 0;
It gives me the following error:
Error Code: 1093. You can't specify target table 'product' for update in FROM clause