raghavendra kandukuri
raghavendra kandukuri

Reputation: 61

Find list of tables in the stored procedure

I have a procedure name, catalog name and the schema name and i’m trying to find list of tables that are associated with the procedure

Tried several different ways but nothing worked..

Upvotes: 0

Views: 473

Answers (1)

1pluszara
1pluszara

Reputation: 1528

Try this:

SELECT NAME,REFERENCED_NAME,REFERENCED_TYPE
  FROM USER_DEPENDENCIES
 WHERE TYPE IN ('PROCEDURE','PACKAGE','FUNCTION') AND REFERENCED_TYPE = 'TABLE'
ORDER BY REFERENCED_OWNER, REFERENCED_NAME, REFERENCED_TYPE;

Upvotes: 3

Related Questions