I want to query the name of all columns of a table. I found how to do this in:
But I also need to know:
SELECT name FROM sys.columns WHERE object_id = OBJECT_ID('TABLE_NAME')
TABLE_NAME is your table
TABLE_NAME