您的位置:首页 > 数据库 > MySQL

醉了,mysql的删除居然变得这么麻烦 delete from table where id in()

2015-01-07 10:01 639 查看
居然要加这么多层,还需要在里面加一个别名才可以。

删除标题重复的旧记录。

delete from theTable where id in
(
	select id from 
	(
		select min(id) id from theTable group by title H***ING count(*)>1
	) ids
) ;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐