Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to get the column names in a table

Author  Topic 

fh200300us
Starting Member

28 Posts

Posted - 2008-02-06 : 13:45:04
I want to know how to use query to get the column names (not value) in a table.

Thanks in advance,

Jack

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-06 : 13:47:39
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'YourTableNameHere'
Go to Top of Page

fh200300us
Starting Member

28 Posts

Posted - 2008-02-06 : 13:49:18
thanks.
Go to Top of Page
   

- Advertisement -