随笔-71  评论-5  文章-0  trackbacks-0
语句对的,但不能执行
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 藤本蔷薇 阅读(132) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: