SQLTeam.com | Weblogs | Forums

How to find all columns in single sp using sql


#1

How to find all columns in single sp using sql


#2

What does sp mean? Normally it is stored procedure, which does not have columns. The tables have columns and the stored procedure uses a query to do work.


#3

selected columns in sp how can i find out


#4

By your response I still do not know what sp is. Are you trying to determine the parameters that the stored procedure needs? Can you look at the stored procedure?


#5

Try this. Replace "myprocedure" with your procedure name:

SELECT name, system_type_name
FROM sys.dm_exec_describe_first_result_set_for_object
(
OBJECT_ID('dbo.myprocedure'),
NULL
);