List of Collection methods : Introduction « Collections « Oracle PL/SQL Tutorial






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:

  1. EXISTS(row) returns TRUE if the row specified exists.
  2. COUNT returns the number of rows.
  3. FIRST returns the row number of the first populated row.
  4. LAST returns the row number of the last populated row.
  5. PRIOR(row) returns the row number of the last row populated before the row specified.
  6. NEXT(row) returns the row number of the next row populated after the row specified.
  7. DELETE removes all rows.
  8. DELETE(row) removes the specified row.
  9. DELETE(start_row,end_row) removes all rows between and including the start_row and end_row.
  10. TRIM removes the last row.
  11. TRIM(n) removes the last n rows.
  12. EXTEND adds one row.
  13. EXTEND(n) adds n rows.
  14. EXTEND(n,m) adds n copies of row m.
26.1.Introduction
26.1.1.Collections stores sets of elements
26.1.2.Multilevel Collection Types
26.1.3.List of Collection methods