--先排序然后删除第n条数据
delete from scott.emp
 where empno in (select empno
                   from (select *
                           from scott.emp
                          where comm is null
                            and rownum < 2
                          order by hiredate desc));

--先排序然后更新第n条数据
update scott.emp                                  
   set comm = 123                                 
 where empno in (select empno                     
                   from (select empno             
                           from scott.emp         
                          where rownum < 2        
                            and comm is null      
                          order by hiredate asc));

相关文章:

  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-10
  • 2022-01-31
  • 2022-12-23
猜你喜欢
  • 2021-11-02
相关资源
相似解决方案