How to get list of all the procedure inside a package oracle

前端 未结 4 920
无人及你
无人及你 2020-12-10 00:41

Can I get the name of all the function inside a package. Suppose I have a package PKG_OWA and I want to list all the procedure inside the package.

4条回答
  •  时光说笑
    2020-12-10 01:43

    Maybe useful to someone, this is a way to find out procedure and function specified on package body only too.

    select name, 
           type,
           decode(usage,'DECLARATION', 'body only', 'DEFINITION', 'spec and body', usage) defined_on,
           line body_line
      from user_identifiers ui
      where type in ('PROCEDURE', 'FUNCTION')
      and usage_context_id = (select usage_id
        from user_identifiers
          where object_name = ui.object_name
            and object_type = ui.object_type
            and usage_context_id = 0)
      and object_name = 'your package name'
      and object_type = 'PACKAGE BODY'
      order by name
    

提交回复
热议问题