为何问题补充中的sql语句中delete后面要跟表名呢?基本的mysql语句中delete后面直接from表名不就可以了吗? 30
deleteusersasafromusersasa,(selectmin(id),namefromusersgroupbynamehavingcount(name)>1...
delete users as a from users as a,( select min(id) , name from users group by name having count(name)
> 1) as b where a.name = b.name and a.id <>b.id; 展开
> 1) as b where a.name = b.name and a.id <>b.id; 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询