多表刪除,1064(42000)錯(cuò)誤
mysql> DELECT t1 FROM tdb_goods AS t1 LEFT JOIN (SELECT goods_name,goods_id FROM tdb_goods GROUP BY goods_name HAVING COUNT(goods_name) >= 2) AS t2
? ? -> ON t1.goods_name = t2.goods_name WHERE t1.goods_id > t2.goods_id;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELECT t1 FROM tdb_goods AS t1 LEFT JOIN (SELECT goods_name,goods_id FROM tdb_go' at line 1
2020-02-06
delete不是delect,你是想查詢還是刪除哦,多去學(xué)學(xué)英語(yǔ)哈