How to Retrieve Column Names of a Table in SQL Server 2012?
Deepak Kamboj
SELECT * FROM sys.columns WHERE object_id = OBJECT_ID('dbo.yourTableName')
select COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME like 'YourTableName'
exec sp_columns TableName