Friday, June 11, 2010

Getting the list of parameter for stored procedure

There are 2 ways to list down the parameters for stored procedure.

(1) In SQL2000 or above, you may do this:

select *
from syscolumns
where id = object_id('pr_get_sales_data')

(2) In SQL2005 or above, you may do this:

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

No comments:

Post a Comment