insert into table2 select b.cldm1, a.clmc from table1 as a left join (select min(cldm) as cldm1, clmc from table1 group by clmc) as b on a.clmc = b.clmc
insert into table2 select a.cldm,b.cldm from table1 a, (select max(cldm),clmc from table1 group by clmc having count(*)>1) b where a.clmc=b.clmc
insert into table2 select a.cldm,b.aa from table1 a, (select max(cldm) as aa,clmc from table1 group by clmc having count(*)>1) b where a.clmc=b.clmc
select b.cldm1, a.clmc from table1 as a left join
(select min(cldm) as cldm1, clmc from table1 group by clmc) as b on a.clmc = b.clmc
insert into table2
select a.cldm,b.cldm from table1 a,
(select max(cldm),clmc from table1 group by clmc having count(*)>1) b
where a.clmc=b.clmc
select a.cldm,b.aa from table1 a,
(select max(cldm) as aa,clmc from table1 group by clmc having count(*)>1) b
where a.clmc=b.clmc