3
Reply

How to Retrieve Column Names of a Table in SQL Server 2012?

Deepak  Kamboj

Deepak Kamboj

11y
2.2k
0
Reply

    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