你的位置:首页 > 数据库

[数据库]MySQL联表更新插入数据


Error:

 

DELETE FROM t_23andme_addref       

WHERE id IN (  SELECT min(id)  FROM t_23andme_addref   GROUP BY rsid 

HAVING count(rsid) > 1)

 

ERROR 1064 (42000): You have an error in your SQL syntax;

DELETE tt FROM t_23andme_addref tt,    ( SELECT min(id) AS id      FROM t_23andme_addref    GROUP BY rsid     HAVING count(rsid) > 1) AS b WHERE tt.id = b.id;