SQL Server 2005 List Column Names

No replies
Tech-Karma
Tech-Karma's picture
User offline. Last seen 21 weeks 5 days ago. Offline
Karma Moderator
Joined: 09/17/2009
Posts: 204

Use the following command to list column names in your SQL 2005 database:

SELECT column_name 'Column Name',

       data_type 'Data Type'

FROM information_schema.columns

WHERE table_name = 'TABLE_NAME'