In T-SQL how to display columns for given table name?
Posted
by salvationishere
on Stack Overflow
See other posts from Stack Overflow
or by salvationishere
Published on 2010-04-08T20:26:01Z
Indexed on
2010/04/08
20:53 UTC
Read the original article
Hit count: 373
I am trying to list all of the columns from whichever Adventureworks table I choose. What T-sQL statement or stored proc can I execute to see this list of all columns? I want to use my C# web app to input one input parameter = table_name and then get a list of all the column_names as output. Right now I am trying to execute the sp_columns stored proc which works, but I can't get just the one column with select and exec combined. Does anybody know how to do this?
© Stack Overflow or respective owner