Delete an entire collection

To delete the entire collection in a collection column you can use the UPDATE statement to set the collection to empty.

The UPDATE statement in the following example effectively deletes the entire collection in the set_col column of the tab_set table for the row in which id_col equals 5.
EXEC SQL create table tab_set
( 
   id_col integer,
   set_col set(integer not null)
);
EXEC SQL update tab_set set set_col = set{}
   where id_col = 5;
The same UPDATE statement without the WHERE clause, as shown in the following example, would set the set_col column to empty for all rows in the tab_set table.
EXEC SQL update tab_set set set_col = set{};