解决方案 »

  1.   

    update org_info set op_type = 1
    where rowid in (select recordid from (select rowid recordid,row_number() over(partition by id order by occur_date ASC) RN
                                                           from org_info) 
                                where  RN = 1 )
      

  2.   

    你需要更新的是表中的数据,而不是你select语句查询出来的视图
      

  3.   

    楼上的方法可行。先找到满足要求的数据的rowid,再用in批量update。
    update org_info set op_type = 1 where rowid in (
    select rid
      from (select rowid rid,
                   row_number() over(partition by id order by occur_date ASC) RN
              from org_info oi)
     where rn = 1
     )