0

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..

APC
  • 144,005
  • 19
  • 170
  • 281
  • Standalone procedures (in which case [see this](https://stackoverflow.com/q/3090641/266304)), or in a package (look up the PL/Scope tool)? (And what do you mean by catalog?) If you included the ways you tried, and why they didn't work, in your question we might be able to tell you what you're doing wrong. – Alex Poole Feb 19 '19 at 18:16
  • Can you be more specific about what you have tried? – Daniel Feb 19 '19 at 18:48

1 Answers1

3

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;
1pluszara
  • 1,518
  • 3
  • 14
  • 26