語句對的,但不能執(zhí)行
delete from h_oddnum where id in (select min(id) from h_oddnum group by d_date having count(d_date) > 1)
只能創(chuàng)建臨時(shí)表刪除
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
藤本薔薇 閱讀(140)
評論(0) 編輯 收藏