ORACLE-Remove duplicate records in the table, and only keep the first record

Through the over() function, add serial numbers to the data packets, and finally filter to remove duplicates.

select row_number() over(partition by a.分组列 order by a.排序列) rn,a.* from table_name a;

Guess you like

Origin blog.csdn.net/weixin_36522099/article/details/109047937