Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get stored procedure parameters by either C# or SQL?

I was hoping to find an easy way to get a parameter list of a stored procedures parameters. If the procedure has 3 paramaters, I want a list like this:

param1
param2
param3

It would be best to be able to do this in C# Code, but SQL would suffice as well. Ideas?

like image 210
grady Avatar asked Jun 14 '10 15:06

grady


People also ask

Can pass 3 types of parameters to stored procedures What are they?

As a program, a stored procedure can take parameters. There are three types of parameters: IN, OUT and INOUT.

How do you pass dynamic parameters in SQL query?

The best way to pass the dynamic values to a SQL query is by using parameters. In order to use this option, click on "Edit query" in "Execute Query" or "Execute nonquery" activity. Click on the Parameters property in the Input section and pass the parameters.

Can a stored procedure accept parameters?

You can also pass parameters to a stored procedure, so that the stored procedure can act based on the parameter value(s) that is passed.


1 Answers

select * from information_schema.parameters where specific_name='your_procedure_name' 

Also refer this post to know more methods https://exploresql.com/2016/10/14/different-methods-to-get-parameter-list-of-a-stored-procedure/

like image 147
Madhivanan Avatar answered Oct 03 '22 05:10

Madhivanan