Multiple choice technology databases

Examine the code in the following PL/SQL block: DECLARE TYPE NumList IS TABLE OF INTEGER; List1 NumList := NumList(11,22,33,44); BEGIN List1.DELETE(2); DBMS_OUTPUT.PUT_LINE ( 'The last element# in List1 is ' || List1.LAST || ' and total of elements is '||List1.COUNT); List1.EXTEND(4,3); END; / Which two statements are true about the above code? (Choose two.)

  1. LAST and COUNT give different values.

  2. LAST and COUNT give the same values.

  3. The four new elements that are added contain the value 33.

  4. The four new elements that are added contain the value 44.

Reveal answer Fill a bubble to check yourself
A,C Correct answer
Explanation

After deleting element at position 2, LAST returns 4 (highest index) while COUNT returns 3 (actual elements), so they differ. The EXTEND(4,3) operation copies the value from index 3 (which is 33) into four new elements.