What's the best way to dedupe a table on the unique key? So far I can find out the number of duplicates by using the SQL below however how do I delete the duplicates leaving only 1 record for each custno (as you see below the count varies)?
select custno, count(custno) "cnt"
from customers
group by custno
having (count(custno)>1)
custno cnt
1234 2
5678 3
9101 1
1121 2
TIA.