Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: SQL
Expertise: Beginner
Mar 14, 2017

Find the Source Code of a Function or Procedure in Oracle SQL

If you need to find the source code for a function or procedure in the database, it's easy to do in Oracle.

You can query the all_source view to get a list of all of the source code.

SELECT text
FROM all_source
WHERE name = your_function_Name
ORDER BY line;

Replace your_function_name with the name of your function.

The text column shows the line of SQL code. You can copy this into a text editor or another file.

If you want to know what type of object you're looking at, refer to the type column in this table (e.g. function, package).

Also, if you're querying in an IDE such as SQL Developer, you can get the output in a table. This can be easily copied into a text editor.

Ben Brumm
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date