What is the SQL Server system table that contains information about stored procedure parameters with it's information like datatype, name, lenght, null or not?
thanks
Since in database we have tables, that's why we use DESCRIBE or DESC(both are same) command to describe the structure of a table. Syntax: DESCRIBE one; OR DESC one; Note : We can use either DESCRIBE or DESC(both are Case Insensitive).
Table-valued parameters are declared by using user-defined table types. You can use table-valued parameters to send multiple rows of data to a Transact-SQL statement or a routine, such as a stored procedure or function, without creating a temporary table or many parameters.
SQL Server stored procedure is a batch of statements grouped as a logical unit and stored in the database. The stored procedure accepts the parameters and executes the T-SQL statements in the procedure, returns the result set if any.
You can query sys.procedures and sys.parameters...
select pr.name, p.*
from sys.procedures pr
inner join sys.parameters p on pr.object_id = p.object_id
And join to types too...
select pr.name, p.*, t.name, t.max_length
from sys.procedures pr
inner join sys.parameters p on pr.object_id = p.object_id
inner join sys.types t on p.system_type_id = t.system_type_id
You can also use
select * from INFORMATION_SCHEMA.PARAMETERS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With