Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle - View function body from a package

I have a function inside of a package in Oracle and am wanting to view the implementation or the body of one of the functions.

I can find the package in the all_source view but cannot find the function. I have also tired the user_source view.

Is the function details located in a different view or table? I know it can be done as I found it yesterday but stupidly did not save the query...

Note

I want to view the body of the function inside the package not the body of the package itself

like image 988
ojhawkins Avatar asked Apr 19 '26 15:04

ojhawkins


1 Answers

You can find the package body in all_source view.

  SELECT *
    FROM all_source
   WHERE TYPE = 'PACKAGE BODY' AND name = '<your package name>'
ORDER BY line;

I think you are probably trying to search using function name and not able to find it.

like image 75
Noel Avatar answered Apr 21 '26 16:04

Noel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!