ORACLE 重復數據修改其中一條


oracle更新bai數據兩du條以上相同zhi則只更dao新一zhuan條
update 表名shu t
set t.st = '1'
where rowidtochar(rowid) in
(select t2.r1
from (select rowidtochar(rowid) r1,
row_number() over(partition by t.id, t.na order by 1) r2
from 表名 t
where t.st = '0') t2
where t2.r2 = 1);


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM