delete from tb1 where id in(
select t2.minnum from(select MIN(t1.id) as minnum,t1.col1 as ars ,COUNT(1) as cx from tb1 t1 group by t1.col1
)t2)
select * from tb1;
11 1
14 2
17 3
18 333
19 4
时间: 2024-11-09 03:19:30
delete from tb1 where id in(
select t2.minnum from(select MIN(t1.id) as minnum,t1.col1 as ars ,COUNT(1) as cx from tb1 t1 group by t1.col1
)t2)
select * from tb1;
11 1
14 2
17 3
18 333
19 4