zoukankan      html  css  js  c++  java
  • 先对结果集排序然后做update、delete操作

    --先排序然后删除第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));

  • 相关阅读:
    HelloCSS-Border
    开发你的第一个NCS(Zephyr)应用程序
    NanoPi R4S (RK3399) openssl speed 硬件加解密性能测试结果
    Flink-状态
    Flink-时间语义和Watermark
    Flink-Window
    Flink-运行时架构
    Flink-流处理wordcount
    Flink-批处理wordcount
    设计模式七大原则-合成复用原则
  • 原文地址:https://www.cnblogs.com/iyoume2008/p/6935149.html
Copyright © 2011-2022 走看看