It's known that in order to assign values to nested table we need to allocate it and then initialize it as shown below
TYPE nestedtbl_test1 IS TABLE OF VARCHAR2(25);
nestedtbl_elements1 nestedtbl_test1 := nestedtbl_test1();
nestedtbl_elements1(1) := 'element1';
nestedtbl_elements1(2) := 'element2';
However when I tried to create a nested table of record type as shown below, I didn't have to create a constructor in order to initialize it when i used cursor to fetch the records.
TYPE bulk_rec_type IS RECORD (
TYPE bulk_select_table IS TABLE OF bulk_rec_type;
cursor records is
select emp_id, dept_id from employee;
FETCH C_BULK_SELECT BULK COLLECT INTO v_bulk_select
Can somebody explain, why in this case I didn't have to create a constructor, while in the first example I'd had to.
Vidhu V S
Oracle PL SQL Developer