Lesson 6 | Delete an entire Array or nested Table |
Objective | Write a delete command to remove all rows from a nested table or an Array |
DELETE
statement with the THE
or the TABLE
keyword, as following example shows:DELETE TABLE(SELECT d.detail_nest FROM SALE_HEADER d WHERE d.sale_id = 35);The DML statement above deletes all the elements from a nested table.
NULL
, as the following example shows:
UPDATE SALE_HEADER SET detail_nest = NULL WHERE sale_id = 35);
NULL
, which in turn deletes all the elements within the table.Now that you have learned few techniques for deleting rows from nested tables and varrays, try them yourself with the following tutor-based exercise. In this exercise, you will be asked to build a DELETE
statement to delete the records from the SALE_HEADER
table.