How I list the Packages in the oracle

Asked

Viewed 959 times

1

How do I query(PL/SQL) to list a specific Package existing in the database(Oracle)?

  • List all objects in a package or all objects that are Packages?

1 answer

2


To list all Packages:

SELECT   object_name
FROM     user_objects
WHERE    object_type = 'PACKAGE';

To check if a specific package exists:

SELECT   object_name
FROM     user_objects
WHERE    object_type = 'PACKAGE'
    AND  object_name = 'NomeDoPackage'
  • Which list of all Packages works, but the one that should bring the specific package does not work.

  • @pnet my first suspicion would be that you do not have access to the package in question, or the name is slightly different (or in a different case if your instance of Oracle is doing case-sensitive comparison).

  • I click on the package and copy its name and when I paste in the query it(name) is all in low box. I gave an upper() and that solved, IE, is Case Sensitive. But I’ve already marked the answer. Thanks and thanks.

  • @pnet not so it is always a pleasure to help!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.