select rownum as "No.", object_name as "Имя пакета", type as "Тип объекта", name as "Имя объекта" from all_identifiers where object_type in ('PACKAGE', 'PACKAGE BODY') and usage='DECLARATION' and type in ('VARIABLE', 'CONSTANT') and usage_context_id in (select usage_id from all_identifiers where type='PACKAGE');
