Professional Documents
Culture Documents
Difference Between Collections
Difference Between Collections
Difference Between Collections
EXISTS
COUNT
LIMIT : For nested tables, which have no maximum size, LIMIT returns NULL
FIRST and LAST : smallest and largest index numbers in a collection.
PRIOR and NEXT :
EXTEND
TRIM
DELETE
collection_name.method_name[(parameters)]
Also, EXTEND and TRIM cannot be used with index-by tables. EXISTS, COUNT, LIMIT,
FIRST, LAST, PRIOR, and NEXT are functions; EXTEND, TRIM, and DELETE are procedures.
EXISTS, PRIOR, NEXT, TRIM, EXTEND, and DELETE take integer parameters.
Only EXISTS can be applied to atomically null collections. If you apply another method
to such collections, PL/SQL raises COLLECTION_IS_NULL.
Difference between Nested Table and Index By Table :-
1) Nested tables can be stored in a database column but Index-by tables cannot.
2) Size of Index-by table is unconstrained (Table size grows as the rows are added
to the table) But to extend a nested table, you must use the built-in procedure
EXTEND.
3) The built-in procedure TRIM can be applied to Nested tables But cannot be
applied to Index-by tables.
4) Uninitialized nested table is atomically null (that is, the table itself is null, not its
elements), but an Uninitialized index-by table is merely empty. So, you can apply the
IS NULL comparison operator to nested tables but not to index-by tables.