vlevesque
Newbie
Points: 2
More actions
December 2, 2003 at 7:53 am
#84756
Is there a way to list the columns names in a table through a query?
Thanks,.
DavidT
SSCommitted
Points: 1727
December 2, 2003 at 8:03 am
#484297
Try having a look at the INFORMATION_SCHEMA. Views in SQL Books Online.
eg:
select * from INFORMATION_SCHEMA.Columns where Table_Name = "TableName"
December 2, 2003 at 12:27 pm
#484348
Works Great, thanks for the info.
Mark Harr
SSCrazy Eights
Points: 9921
December 3, 2003 at 5:43 am
#484433
Or sp_help <tablename> (easier to type)
Mark
cneuhold
Hall of Fame
Points: 3375
December 4, 2003 at 5:58 am
#484577
hi!
have a look at
http://www.sqlservercentral.com/scripts/contributions/246.asp
for more comprehensive information
best regards,
chris.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply