欢迎投稿

今日深度:

醉了,mysql的删除居然变得这么麻烦 delete from t

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


居然要加这么多层,还需要在里面加一个别名才可以。

删除标题重复的旧记录。

delete from theTable where id in
(
	select id from 
	(
		select min(id) id from theTable group by title HAVING count(*)>1
	) ids
) ;


www.htsjk.Com true http://www.htsjk.com/shujukunews/5720.html NewsArticle 醉了,mysql的删除居然变得这么麻烦 delete from table where id in(),mysqltable 居然要加这么多层,还需要在里面加一个别名才可以。 删除标题重复的旧记录。 delete from theTable where id in(select...
评论暂时关闭