checking structure of GLobally defined Varray or nested table in PL/SQL

87 Views Asked by At

I am modifying a package. In one of the procedure I got below line.

query_det_arr   ecc_query_det_arr_type := ecc_query_det_arr_type(NULL);

this ecc_query_det_arr_type is not defined anywhere inside the package. as per my understanding this must be varray or nested table.

They may have created using separate create command.

Is there anyway to check what ecc_query_det_arr_type contains? I mean any query or anyway in sql developer?

2

There are 2 best solutions below

0
On

Ok, here is another way:

select * from user_source where type = 'TYPE' and lower(name) = 'ecc_query_det_arr_type';
1
On

One way to do that is desc <your_type> like below:

desc ecc_query_det_arr_type;

A side note: Since you are taking a guess here, I thought of writing. It is always better to follow a naming convention for Oracle Objects. In your case I would have created that type like below:

         ecc_query_det_ntt if it is nested table type
         ecc_query_det_aat if it is associative array type
         ecc_query_det_vat if it is varray type