Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 27th, 2012  |  syntax: None  |  size: 0.52 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Why bulk collect into clause is limiting the size of nested table in pl/sql
  2. declare
  3.    type yy is table of t12.name%type;
  4.    y yy:=yy();
  5.    n number:=1;
  6. begin
  7.    y.extend(10);
  8.    select name bulk collect into y from t12;
  9.    --select name into y(5) from t12 where id=1; If i uncomment this line it gives error
  10.    for i in (select name from t12)
  11.    loop
  12.       dbms_output.put_line(y(n));
  13.       n:=n+1;
  14.    end loop;
  15. end;
  16.        
  17. declare
  18.   type yy is table of t12.name%type;
  19.   y yy;
  20. begin
  21.   select name bulk collect into y from t12;
  22. end;