Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Using table of anydata as a column in a table in oracle

I’m trying to pass data from one session to another.
This can be different object types.
So we store the data in in an anydata column.

Now I’m trying to change this so we can add multiple data to this procedure.

So I want a procedure with an input of table of anydata.
And then I store this type in a table.
So I can create the type like this:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

create type anydatatable as table of anydata;

But when I want to store it in a table I get the error:

create table table_any (c1 number, c2 anydatatable )

ORA-22913

How can I avoid this problem ? I ready about nested table xxx store as xxx but I can’t get it to work with this example.

>Solution :

The full error message is:

ORA-22913: must specify table name for nested table column or attribute

Which tells you that you must "specify [the] table name for [a] nested table column". The syntax can be found in the CREATE TABLE documentation:

create table table_any (c1 number, c2 anydatatable )
NESTED TABLE c2 STORE AS table_any__c2

fiddle

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading