A series of collection methods can be used to determine the size, and the rows populated, in any collection datatype: index-by tables, VARRAYs, and nested tables.
The following is a list of the collection methods and their purposes:
- EXISTS(row) returns TRUE if the row specified exists.
- COUNT returns the number of rows.
- FIRST returns the row number of the first populated row.
- LAST returns the row number of the last populated row.
- PRIOR(row) returns the row number of the last row populated before the row specified.
- NEXT(row) returns the row number of the next row populated after the row specified.
- DELETE removes all rows.
- DELETE(row) removes the specified row.
- DELETE(start_row,end_row) removes all rows between and including the start_row and end_row.
- TRIM removes the last row.
- TRIM(n) removes the last n rows.
- EXTEND adds one row.
- EXTEND(n) adds n rows.
- EXTEND(n,m) adds n copies of row m.