Delete elements from a collection variable

After you have initialized a collection host variable with a collection column, you can use the DELETE statement and the collection-derived table clause to delete an element of a collection variable. The collection-derived table clause identifies the collection variable in which to delete the elements.

The DELETE statement and the collection-derived table clause allow you to perform the following operations on a collection variable:
  • Delete all elements in the collection.

    Use the DELETE statement (without the WHERE CURRENT OF clause).

  • Delete a particular element in the collection.

    You must declare an update cursor for the collection variable and use DELETE with the WHERE CURRENT OF clause.

Neither form of the DELETE statement can include a WHERE clause.