1/* To retreive the column names of table using sql */
2
3SELECT COLUMN_NAME.
4FROM INFORMATION_SCHEMA. COLUMNS.
5WHERE TABLE_NAME = 'Your Table Name'
1/* To retreive the column names of table using COLUMN_NAME */
2SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = N'table_name_here'