Purpose of using different types of PL/SQL collections in Oracle

后端 未结 6 1563
误落风尘
误落风尘 2020-12-28 11:30

What is the main purpose of using collections in oracle ?

  1. Index by tables

  2. Nested tables

  3. Variable size ARRAY

6条回答
  •  自闭症患者
    2020-12-28 11:58

    Index by tables are user defined data types which is used to store multiple data items. Basically these tables are unconstrained tables. Index by table having two parts, these are value field and key field. In value field, oracle server stores actual data, where as in key field oracle server stores indexes, that’s why index by table having ‘key value’ pairs and also indexes are by default integers, and these indexes are in between negative to positive numbers. This index field behaves like a primary key, it doesn’t accept duplicate values. Generally index by tables are used to improve the performance or application, because these tables are stored in memory area, that’s why these tables are also called a memory tables. Generally to improve the performance of the application, these table indexes are using ‘binary-integer’ data type, so we are creating in two step process. First we are creating type, then only we are creating a variable of that type.

    Syntax:-

    Step1:- Type typename is table of data type (size) index by binary_integer;

    Step2:- Variablename typename;

    For Morinformation >>>PL/SQL Index by tables (or) PL/SQL tables (or) associative arrays

提交回复
热议问题