Caffeinated
Caffeinated

Reputation: 12474

In Oracle, is there a query to find whether a function exists?

Suppose that I want to find out whether a function called PERIOD_DIFF exists in Oracle SQL.

Is there a way to do so via SQL*Plus , running a query ?

Upvotes: 3

Views: 5403

Answers (2)

pksnj
pksnj

Reputation: 56

You can also try: Select owner, object_name from all_objects where object_type = 'FUNCTION' and object_name = 'PERIOD_DIFF'

Upvotes: 0

Arun
Arun

Reputation: 951

You can try one of these. user_source dba_source all_source

For example if you have access to dba_source, you can try something like this

 SELECT name from dba_source where type = 'FUNCTION' AND name LIKE '%PERIOD_DIFF%'/

Upvotes: 5

Related Questions