語句對的,但不能執行
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;