Skip to main content

Posts

Showing posts from September, 2006

Oracle Collections

PL/SQL Collections Index-by tables (Associative Arrays) : They are arrays with the only difference that we can use numbers, string literals for subscript values. Associative Arrays are sets of key-value pairs, where key can be an integer or a string. There is no limitation on the size of Associative Arrays. Syntax: TYPE type_name IS TABLE OF element_type [NOT NULL] INDEX BY [BINARY_INTEGER | PLS_INTEGER | VARCHAR2 (size_limit)] ; Nested Tables : They are single dimensional, array-like tables, that can hold any number of elements inside another database table and can be manipulated by SQL as other database objects. Syntax: TYPE type_name IS TABLE OF element_type [NOT NULL]; Varying Arrays : As the name suggests, varrays (Varying Arrays) are fixed length arrays that use sequential numbers as subscripts. varrays need to be dense and we cannot remove/delete individual elements from the array. Length is defined at design time and can be manipulated at runtime subject to maximum ...