且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PLSql返回值

更新时间:2022-05-12 06:27:06

为什么不只使用sql:

Why not use just sql:

   SELECT MAX(ltrim(sys_connect_by_path(flow_run_id, ','), ','))
   FROM
   (
    select flow_run_id, rownum rn
    from table
    where CREATED_DATE < sysdate - 32
    and rownum < 10
    order by 1 desc
   )
   START WITH rn = 1
   CONNECT BY PRIOR rn = rn - 1