Nigel
Nigel

Reputation: 47

How to identify which procedure used a table in oracle

I have a code in sybase which I use to fetch the procedures that use a given table.

What would be the equivalent Oracle code

use <<database>>
go
select so.type,so.name from sysobjects so, syscomments sc
where so.id=sc.id
and sc.text like '%<<tablename>>%'
and so.type='U'

Upvotes: 0

Views: 107

Answers (1)

Beege
Beege

Reputation: 665

select owner, name, type, text
from all_source where text like lower('%<<tablename>>%');

TYPE is the oracle object type like PACKAGE,PROCEDURE,FUNCTION, etc.

Upvotes: 1

Related Questions