Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Syntax of TYPE ... IS TABLE OF... in PL/SQL reference book

soutouDec 19 2019 — edited Dec 22 2019

Hi,

Something seems wrong in the syntax of TYPE ... IS TABLE OF... in the official documentation since 11g.

In 10gR2 : https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/collection_definition.htm#sthref2535

TYPE type_name IS TABLE OF element_type [NOT NULL]

[INDEX BY {PLS_INTEGER | BINARY_INTEGER| VARCHAR2(v_size) } ];

Since 11g

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/lnpls/collection-variable.html#GUID-89A1863C-65A1-40CF-9392-86E9FDC21BE9

https://docs.oracle.com/en/database/oracle/oracle-database/18/lnpls/collection-variable.html#GUID-89A1863C-65A1-40CF-9392-86E9FDC21BE9

https://docs.oracle.com/en/database/oracle/oracle-database/19/lnpls/collection-variable.html#GUID-89A1863C-65A1-40CF-9392-86E9FDC21BE9

we can see :

TYPE type IS TABLE OF datatype [ NOT NULL ]

INDEX BY { PLS_INTEGER | BINARY_INTEGER | VARCHAR2 ( v_size ) | data_type }

options_TABLE_OF.JPG

The question is : is it possible to define a type for an associative array indexed by a long, rowtype or user define type ?

This post has been answered by Solomon Yakobson on Dec 20 2019
Jump to Answer
Comments
Post Details
Added on Dec 19 2019
18 comments
18,189 views