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
 General SQL Server Forums
 New to SQL Server Programming
 list of columns

Author  Topic 

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2007-04-18 : 05:01:44
Dear Folks,
Can you please tell me the query to display the columns in a table?



thank you very much

Vinod

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-18 : 05:09:13
1. sp_help 'tablename'
2. Select Column_name from Information_Schema.Columns where Table_Name = 'table-name'
3. sp_columns 'table-name'

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-04-18 : 05:17:11
select * from information_schema.columns


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-04-18 : 05:42:55



Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -