How can I get a column details and their data type by using stored procedure in SQL server ?

Please give me a suitable example for it. 

Last updated:4/3/2019 1:31:37 AM

1 Answers

Aditya Patel
Aditya Patel

If you want to get Stored Procedure Result Column details and datatype Types use the following Script:

EXEC sp_describe_first_result_set N'YourStoredProcedureName'

If you want to get table Column details and datatype Types or Name use the following Script:

exec sp_columns yourtablename


Answer