首页 > 代码库 > sql 更新重复数据只取一条记录

sql 更新重复数据只取一条记录

select s.*  
from (
    select *, row_number() over (partition by PersonnelAccount order BY PersonnelID) as group_idx  
    from AUX_SpecialPersonnel
) s
where s.group_idx > 1

sql 更新重复数据只取一条记录