语句对的,但不能执行
delete from h_oddnum where id in (select min(id) from h_oddnum group by d_date having count(d_date) > 1)
只能创建临时表删除
create table tmp as select min(id) as col1 from h_oddnum group by d_date having count(d_date) > 1;
delete from h_oddnum where id not in (select col1 from tmp);
drop table tmp;
posted on 2015-04-22 16:50
藤本蔷薇 阅读(139)
评论(0) 编辑 收藏