Wednesday, March 26, 2008

Get Columns Names of the MS SQL Table

Following MS SQL query gives the list of column names of the table_Name

select col.name from sysobjects obj inner join syscolumns col on obj.id = col.id where obj.name = 'table_Name'

No comments: