How can I delete duplicate rows where no unique row id exists?
unique row id
My table is
col1 col2 col3 col4 col5 col6 col7 john 1
DELETE FROM TBL1 WHERE ID IN (SELECT ID FROM TBL1 a WHERE ID!= (select MAX(ID) from TBL1 where DUPVAL=a.DUPVAL group by DUPVAL having count(DUPVAL)>1))