Possible Duplicate:
SQL Server: How do you return the column names from a table?
I wanted to know if there was a way to insert the Column names from on table into a field in another table.
I have a new table where the column names of the old table is now a parameter in the new table.
ie.
old table
[id] [name] [name2] [name3]
1 x x x
new table
[id] [name type]
1 name
2 name2
3 name3