无序号的排序函数

create or replace function Proleg_seqnum(current_uuid varchar2)

return number is

preuuid varchar2(36);

begin

  select PRV_LEG_ID into preuuid from TERMINAL_PRO_LEG_TS where PROCEDURE_LEG_UUID=current_uuid;

  if preuuid is null then return 1;

  else return Proleg_seqnum(preuuid)+1;

  end if;

end;

posted on 2017-11-17 16:34  mol1995  阅读(146)  评论(0编辑  收藏  举报

导航