List SQL Server table column name as rows





5.00/5 (2 votes)
Simple query to get table column name as rows
Introduction
The following script will give table column names as rows. Treat the table name as User
:
SELECT COLUMN_NAME 'All_Columns' FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='User'
Following is the result:
History
- May 03, 2012: Article created