Reputation: 11
I need a query in oracle 11g to get the list of all parameters, their data-type and their mode(IN or OUT) for a given Stored Procedure.
Upvotes: 0
Views: 878
Reputation: 3128
You can take a look at ALL_ARGUMENTS
or USER_ARGUMENTS
Tables.
SELECT ARGUMENT_NAME,DATA_TYPE,IN_OUT
FROM USER_ARGUMENTS WHERE OBJECT_NAME = UPPER('ProcedureName');
Upvotes: 4
Reputation: 674
try the following query
select * from user_source where type = 'PROCEDURE'
This will give you all the stored procedures stored in your schema. Alternatively, you can also define type as Function or Packages to get required information.
Upvotes: 0
Reputation: 126
If you would like to get a view about the parameters of the procedure, just use
SQL> desc <procedure name>;
If you would like to see the code for the procedure, then use (assuming you are logged in as the owner of the procedure)
SQL> SELECT Text FROM User_Source WHERE Name ='PROCEDURENAME' ORDER BY Line;
Upvotes: 0