PL/SQL   «Prev  Next»

Delete Entire Array or Nested Table - Exercise

Delete entire array or Nested Table

Delete from Nested Table

Objective: Write a delete command to remove rows from a nested table.

Exercise scoring

This exercise is worth a total of 10 points. You will receive up to five points for writing the INSERT statement and displaying the results with the correct syntax. You will receive up to five points for adding an explanation.


Write an INSERT statement to insert a row into the nested table within the SALE_HEADER table.


  1. With SQL*Plus, connect to the database by using PETSTORE as the username, GREATPETS as the password, and MYDB as the host string.
  2. Build a statement to delete the records from the nested table within the SALE_HEADER table, where id is 34.
  3. After writing the DELETE statement, answer the following questions:
  4. How do you delete a particular (single) record from a nested table?
  5. How do you delete all the nested table records for all the records within the main table?


Use the TABLE keyword.

Submitting your exercise

After you have
  1. defined the DELETE statement,
  2. added your explanation, and
  3. answered the two questions,
  4. place everything in the text area below and
  5. click the Submit button.