Reputation: 909
I want to generate a PL/SQL script that provide the attribute names of an object type defined by a user. I can see object types defined but I cant find attribute names of this object.
Upvotes: 2
Views: 1153
Reputation: 4551
This works with Oracle 11g and should work with earlier versions
select attr_name
from all_type_attrs
where owner = YourSchemaName
and type_name = YourTypeName
If this object is in another user's schema you will need to have the execute permission before you can see this in all_type_attrs.
(Edited for clarity on permissions from APC's comment)
Upvotes: 6