Viva
Viva

Reputation: 2075

get parameter' s data types of a procedure

I have a list with all my procedures from my database in C#. I need to get the data type of each parameter. For example,I have a procedure called insertmd with parameters: name,age. How to make a select from all_tab_columns that will only display ,for example for parameter name, just: varchar2?

Upvotes: 1

Views: 352

Answers (3)

Thiyagu ATR
Thiyagu ATR

Reputation: 2264

i think it may clarify your view!

select ua.argument_name,ua.data_type,ua.object_name 
  from user_arguments ua;

just use this one for finding all augments.if any clarification please let me know

Upvotes: 3

DazzaL
DazzaL

Reputation: 21973

all_tab_columns is for tables. if you want to see the arguments to a procedure then do:

select * 
  from all_arguments 
 where data_type = 'VARCHAR2' 
   and object_name ='INSERTMD'
   and owner = 'YOURSCHEMA';

that assumes INSERTMD is a standalone procedure/function. if its in a package, then also filter on package_name

Upvotes: 3

Brian O''Byrne
Brian O''Byrne

Reputation: 560

All the information you need should be in INFORMATION_SCHEMA.PARAMETERS view.

Upvotes: 2

Related Questions