用前面建立的函式獲取物件

regonly1發表於2009-02-18
獲取序列的:
declare
  v_seqstr varchar2(1000);
  cursor c_seq is
  select sequence_name from user_sequences;
begin
     dbms_output.enable('99999999999999999999');
     for v_seq in c_seq loop
       select aa.cv  into v_seqstr
        from (select rownum rn, cc.column_value cv  from table(w_func_getobjectddl('SEQUENCE', v_seq.sequence_name)) cc) aa
       where aa.rn = 5;
       dbms_output.put_line(v_seqstr);
     end loop;
end;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12932950/viewspace-555297/,如需轉載,請註明出處,否則將追究法律責任。

相關文章