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);

相关文章:

猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-02
  • 2021-08-29
  • 2021-12-28
  • 2021-11-29
相关资源
相似解决方案