Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 List parameters for a stored procedure

Author  Topic 

sql777
Constraint Violating Yak Guru

314 Posts

Posted - 2008-08-10 : 15:12:18
Hello,

I want to get a list of all the parameters of a stored procedure, with datatype information etc.

how can I do this?

pootle_flump

1064 Posts

Posted - 2008-08-10 : 18:18:47
Hi

I've selected * because of the "etc" - just select the columns you need:

SELECT *
FROM sys.parameters
INNER JOIN
sys.objects
ON sys.objects.object_id = sys.parameters.object_id
INNER JOIN
sys.types
ON sys.types.system_type_id = sys.parameters.system_type_id
WHERE sys.objects.type_desc = 'SQL_STORED_PROCEDURE'
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-10 : 23:45:26
or simply enter stored procedure name,select it and click alt+F1 in ssms query editor
Go to Top of Page
   

- Advertisement -