--查询一张表中有重复的数据(该表无主键) 查询结果为去重后的数据
select * from table1 where rowid !=(select max(rowid)
from table1 b where a.NSUBACCOUNTID=b.NSUBACCOUNTID and a.dtdate = b.dtdate .......)
and a.dtdate=to_date('2021-02-19','yyyy-mm-dd')
--删除 一张表中有重复的数据(该表无主键)
delete from table1 a where rowid !=(select max(rowid)
from table1 b where a.NSUBACCOUNTID=b.NSUBACCOUNTID and a.dtdate = b.dtdate ...... )
and a.dtdate=to_date('2021-02-19','yyyy-mm-dd')